Hold the page queues lock when performing vm_page_flag_set().
This commit is contained in:
parent
77b653d95d
commit
d8e7c54e1e
@ -145,9 +145,9 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage)
|
||||
for (i = 0; i < count; i++) {
|
||||
if ((m[i]->flags & PG_ZERO) == 0)
|
||||
pmap_zero_page(m[i]);
|
||||
vm_page_flag_set(m[i], PG_ZERO);
|
||||
/* Switch off pv_entries */
|
||||
vm_page_lock_queues();
|
||||
vm_page_flag_set(m[i], PG_ZERO);
|
||||
vm_page_unmanage(m[i]);
|
||||
vm_page_unlock_queues();
|
||||
m[i]->valid = VM_PAGE_BITS_ALL;
|
||||
|
@ -433,7 +433,9 @@ kmem_malloc(map, size, flags)
|
||||
* Because this is kernel_pmap, this call will not block.
|
||||
*/
|
||||
pmap_enter(kernel_pmap, addr + i, m, VM_PROT_ALL, 1);
|
||||
vm_page_lock_queues();
|
||||
vm_page_flag_set(m, PG_WRITEABLE | PG_REFERENCED);
|
||||
vm_page_unlock_queues();
|
||||
}
|
||||
vm_map_unlock(map);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user