Skip to content

Commit

Permalink
kernel - Acquire vm_token in pmap_remove_all()
Browse files Browse the repository at this point in the history
* Kitchen sink try to fix the wire_count panic, acquire vm_token
  in pmap_remove_all().
  • Loading branch information
Matthew Dillon committed Oct 5, 2012
1 parent ec3deae commit bcc6a8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/platform/pc32/i386/pmap.c
Expand Up @@ -2053,7 +2053,10 @@ pmap_remove_all(vm_page_t m)


if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) if (!pmap_initialized || (m->flags & PG_FICTITIOUS))
return; return;
if (TAILQ_EMPTY(&m->md.pv_list))
return;


lwkt_getoken(&vm_token);
pmap_inval_init(&info); pmap_inval_init(&info);
while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) {
pmap = pv->pv_pmap; pmap = pv->pv_pmap;
Expand Down Expand Up @@ -2105,6 +2108,7 @@ pmap_remove_all(vm_page_t m)
} }
KKASSERT((m->flags & (PG_MAPPED|PG_WRITEABLE)) == 0); KKASSERT((m->flags & (PG_MAPPED|PG_WRITEABLE)) == 0);
pmap_inval_done(&info); pmap_inval_done(&info);
lwkt_reloken(&vm_token);
} }


/* /*
Expand Down

0 comments on commit bcc6a8a

Please sign in to comment.