o Lock page queue accesses by vm_page_wire() that aren't

within a critical section.
 o Assert that the page queues lock is held in vm_page_wire()
   unless an Alpha.
This commit is contained in:
Alan Cox 2002-07-14 23:51:55 +00:00
parent a8c102a2ec
commit 8b8b8202f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100005
2 changed files with 5 additions and 0 deletions

View File

@ -1070,9 +1070,11 @@ pmap_swapin_thread(td)
m = vm_page_lookup(ksobj, i);
m->valid = VM_PAGE_BITS_ALL;
}
vm_page_lock_queues();
vm_page_wire(m);
vm_page_wakeup(m);
vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
vm_page_unlock_queues();
}
/*

View File

@ -1241,6 +1241,9 @@ vm_page_wire(vm_page_t m)
* it is already off the queues).
*/
s = splvm();
#ifndef __alpha__
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
#endif
if (m->wire_count == 0) {
if ((m->flags & PG_UNMANAGED) == 0)
vm_pageq_remove(m);