1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Hold the page queues lock around calls to vm_page_flag_clear() and

vm_page_wakeup().
This commit is contained in:
Alan Cox 2002-12-28 21:14:44 +00:00
parent decb81fec7
commit 472c3b6f4f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108360

View File

@ -964,9 +964,11 @@ pmap_new_thread(struct thread *td, int pages)
VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
ma[i] = m;
vm_page_lock_queues();
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
m->valid = VM_PAGE_BITS_ALL;
vm_page_unlock_queues();
}
/*
@ -1144,9 +1146,11 @@ pmap_pinit(pmap_t pm)
if ((m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
vm_page_lock_queues();
vm_page_flag_clear(m, PG_BUSY);
m->valid = VM_PAGE_BITS_ALL;
m->md.pmap = pm;
vm_page_unlock_queues();
ma[i] = m;
}