summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-05-23 22:05:08 +0000
committerjhb <jhb@FreeBSD.org>2001-05-23 22:05:08 +0000
commitf8b92da193599f6ed6a514ef64db5df716d34b77 (patch)
treeeecb1a637ef6402e5e19440fd8b2e65525826c02 /sys/kern
parent35be3f27b219ffed4f5dc879ec5fd3455e8237e6 (diff)
downloadFreeBSD-src-f8b92da193599f6ed6a514ef64db5df716d34b77.zip
FreeBSD-src-f8b92da193599f6ed6a514ef64db5df716d34b77.tar.gz
Lock the VM while twiddling the vmspace.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/imgact_elf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 2a15e9c..fbb2a71 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -571,11 +571,12 @@ exec_elf_imgact(struct image_params *imgp)
}
}
- /* XXX: lock the vm_mtx when twiddling vmspace? */
+ mtx_lock(&vm_mtx);
vmspace->vm_tsize = text_size >> PAGE_SHIFT;
vmspace->vm_taddr = (caddr_t)(uintptr_t)text_addr;
vmspace->vm_dsize = data_size >> PAGE_SHIFT;
vmspace->vm_daddr = (caddr_t)(uintptr_t)data_addr;
+ mtx_unlock(&vm_mtx);
addr = ELF_RTLD_ADDR(vmspace);
OpenPOWER on IntegriCloud