o Lock page queue accesses by vm_page_unmanage().
o Assert that the page queues lock is held in vm_page_unmanage().
This commit is contained in:
parent
62f24912aa
commit
5258ed77bb
@ -147,7 +147,9 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage)
|
||||
vm_page_zero_fill(m[i]);
|
||||
vm_page_flag_set(m[i], PG_ZERO);
|
||||
/* Switch off pv_entries */
|
||||
vm_page_lock_queues();
|
||||
vm_page_unmanage(m[i]);
|
||||
vm_page_unlock_queues();
|
||||
m[i]->valid = VM_PAGE_BITS_ALL;
|
||||
m[i]->dirty = 0;
|
||||
/* The requested page must remain busy, the others not. */
|
||||
|
@ -1211,6 +1211,7 @@ vm_page_unmanage(vm_page_t m)
|
||||
int s;
|
||||
|
||||
s = splvm();
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
if ((m->flags & PG_UNMANAGED) == 0) {
|
||||
if (m->wire_count == 0)
|
||||
vm_pageq_remove(m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user