diff options
author | jeff <jeff@FreeBSD.org> | 2002-09-25 02:42:04 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-09-25 02:42:04 +0000 |
commit | 65328ea561634bf0c99b8694cae5d0ed7bd40d33 (patch) | |
tree | ff787ea819dd394935e8c86bde50e8899e8c0d65 /sys/compat | |
parent | 004a26186ffced2872bfe818d0cda9caa0bdf9c3 (diff) | |
download | FreeBSD-src-65328ea561634bf0c99b8694cae5d0ed7bd40d33.zip FreeBSD-src-65328ea561634bf0c99b8694cae5d0ed7bd40d33.tar.gz |
- Hold the vn lock over vm_mmap().
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index a2c9a24..16c8677 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -317,15 +317,15 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) if (error) goto cleanup; + /* Pull in executable header into kernel_map */ + error = vm_mmap(kernel_map, (vm_offset_t *)&a_out, PAGE_SIZE, + VM_PROT_READ, VM_PROT_READ, 0, (caddr_t)vp, 0); /* * Lock no longer needed */ - VOP_UNLOCK(vp, 0, td); locked = 0; + VOP_UNLOCK(vp, 0, td); - /* Pull in executable header into kernel_map */ - error = vm_mmap(kernel_map, (vm_offset_t *)&a_out, PAGE_SIZE, - VM_PROT_READ, VM_PROT_READ, 0, (caddr_t)vp, 0); if (error) goto cleanup; |