summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-23 20:39:15 +0000
committeralc <alc@FreeBSD.org>2002-12-23 20:39:15 +0000
commit8b4847e64e9b489ba9d1c35c7430fe817ef54e2c (patch)
treef96781ff123826724f35d2ed296e463e8ba706fe
parentf786588f12c011579b6f263dfeb9cb3fee910e7f (diff)
downloadFreeBSD-src-8b4847e64e9b489ba9d1c35c7430fe817ef54e2c.zip
FreeBSD-src-8b4847e64e9b489ba9d1c35c7430fe817ef54e2c.tar.gz
- Hold the kernel_object's lock around vm_page_insert(..., kernel_object,
...).
-rw-r--r--sys/vm/vm_contig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index 3ed5021..58666d9 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -243,12 +243,14 @@ again1:
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);
OpenPOWER on IntegriCloud