mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Lock the kernel object in kmem_alloc().
This commit is contained in:
parent
36d1fdf5a2
commit
984a95d563
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115997
@ -196,8 +196,10 @@ kmem_alloc(map, size)
|
||||
for (i = 0; i < size; i += PAGE_SIZE) {
|
||||
vm_page_t mem;
|
||||
|
||||
VM_OBJECT_LOCK(kernel_object);
|
||||
mem = vm_page_grab(kernel_object, OFF_TO_IDX(offset + i),
|
||||
VM_ALLOC_ZERO | VM_ALLOC_RETRY);
|
||||
VM_OBJECT_UNLOCK(kernel_object);
|
||||
if ((mem->flags & PG_ZERO) == 0)
|
||||
pmap_zero_page(mem);
|
||||
vm_page_lock_queues();
|
||||
|
Loading…
Reference in New Issue
Block a user