- Hold the page queues lock around calls to vm_page_flag_clear().

This commit is contained in:
Alan Cox 2002-12-24 19:02:03 +00:00
parent 074ad11567
commit 82ea080d88
2 changed files with 4 additions and 0 deletions

View File

@ -1068,7 +1068,9 @@ vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry)
/*
* Enter it in the pmap...
*/
vm_page_lock_queues();
vm_page_flag_clear(dst_m, PG_ZERO);
vm_page_unlock_queues();
pmap_enter(dst_map->pmap, vaddr, dst_m, prot, FALSE);
vm_page_lock_queues();
vm_page_flag_set(dst_m, PG_WRITEABLE);

View File

@ -401,8 +401,10 @@ kmem_malloc(map, size, flags)
}
if (flags & M_ZERO && (m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
vm_page_lock_queues();
vm_page_flag_clear(m, PG_ZERO);
m->valid = VM_PAGE_BITS_ALL;
vm_page_unlock_queues();
}
vm_object_unlock(kmem_object);