- Hold the kernel_object's lock around vm_page_insert(..., kernel_object,

...).
This commit is contained in:
alc 2002-12-23 20:39:15 +00:00
parent f786588f12
commit 8b4847e64e

View File

@ -243,12 +243,14 @@ contigmalloc1(
vm_map_unlock(map); vm_map_unlock(map);
tmp_addr = addr; tmp_addr = addr;
vm_object_lock(kernel_object);
for (i = start; i < (start + size / PAGE_SIZE); i++) { for (i = start; i < (start + size / PAGE_SIZE); i++) {
vm_page_t m = &pga[i]; vm_page_t m = &pga[i];
vm_page_insert(m, kernel_object, vm_page_insert(m, kernel_object,
OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS)); OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS));
tmp_addr += PAGE_SIZE; tmp_addr += PAGE_SIZE;
} }
vm_object_unlock(kernel_object);
vm_map_wire(map, addr, addr + size, FALSE); vm_map_wire(map, addr, addr + size, FALSE);
splx(s); splx(s);