summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-07-05 18:40:37 +0000
committermarius <marius@FreeBSD.org>2011-07-05 18:40:37 +0000
commit97f9011cd81d27c563028b9f2fe7df9169adde14 (patch)
tree8f217ab440eff877ad6e011fc9f833215dec59bd /sys/sparc64
parentf71b110a36640f214204387737c5964c19a4aeee (diff)
downloadFreeBSD-src-97f9011cd81d27c563028b9f2fe7df9169adde14.zip
FreeBSD-src-97f9011cd81d27c563028b9f2fe7df9169adde14.tar.gz
Call pmap_qremove() before freeing or unwiring the pages, otherwise
there's a window during which a page can be re-used before its previous mapping is removed. Reviewed by: alc MFC after: 1 week
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c
index 9ec19e1..26c95cf 100644
--- a/sys/sparc64/sparc64/pmap.c
+++ b/sys/sparc64/sparc64/pmap.c
@@ -1294,6 +1294,7 @@ pmap_release(pmap_t pm)
pc->pc_pmap = NULL;
mtx_unlock_spin(&sched_lock);
+ pmap_qremove((vm_offset_t)pm->pm_tsb, TSB_PAGES);
obj = pm->pm_tsb_obj;
VM_OBJECT_LOCK(obj);
KASSERT(obj->ref_count == 1, ("pmap_release: tsbobj ref count != 1"));
@@ -1305,7 +1306,6 @@ pmap_release(pmap_t pm)
vm_page_free_zero(m);
}
VM_OBJECT_UNLOCK(obj);
- pmap_qremove((vm_offset_t)pm->pm_tsb, TSB_PAGES);
PMAP_LOCK_DESTROY(pm);
}
OpenPOWER on IntegriCloud