From 8b4847e64e9b489ba9d1c35c7430fe817ef54e2c Mon Sep 17 00:00:00 2001 From: alc Date: Mon, 23 Dec 2002 20:39:15 +0000 Subject: [PATCH] - Hold the kernel_object's lock around vm_page_insert(..., kernel_object, ...). --- sys/vm/vm_contig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c index 3ed502117f87..58666d950c73 100644 --- a/sys/vm/vm_contig.c +++ b/sys/vm/vm_contig.c @@ -243,12 +243,14 @@ contigmalloc1( vm_map_unlock(map); tmp_addr = addr; + vm_object_lock(kernel_object); for (i = start; i < (start + size / PAGE_SIZE); i++) { vm_page_t m = &pga[i]; vm_page_insert(m, kernel_object, OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS)); tmp_addr += PAGE_SIZE; } + vm_object_unlock(kernel_object); vm_map_wire(map, addr, addr + size, FALSE); splx(s);