Permalink
Browse files

kernel - Acquire vm_token in pmap_remove_all() (3)

* Correct bug in last commit, resident_count adjustment has to be
  moved past the revalidation.
  • Loading branch information...
1 parent 2160c64 commit 1c10d640e6ff098938e7733576ce814c8876b118 Matthew Dillon committed Oct 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 sys/platform/pc32/i386/pmap.c
@@ -2062,7 +2062,6 @@ pmap_remove_all(vm_page_t m)
while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) {
pmap = pv->pv_pmap;
KKASSERT(pmap->pm_stats.resident_count > 0);
- --pmap->pm_stats.resident_count;
pmap_hold(pmap);
vm_object_hold(pmap->pm_pteobj);
@@ -2074,6 +2073,7 @@ pmap_remove_all(vm_page_t m)
continue;
}
+ --pmap->pm_stats.resident_count;
pte = pmap_pte_quick(pmap, pv->pv_va);
pmap_inval_interlock(&info, pmap, pv->pv_va);
tpte = loadandclear(pte);

0 comments on commit 1c10d64

Please sign in to comment.