From 65328ea561634bf0c99b8694cae5d0ed7bd40d33 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 25 Sep 2002 02:42:04 +0000 Subject: - Hold the vn lock over vm_mmap(). --- sys/compat/linux/linux_misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/compat/linux/linux_misc.c') 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; -- cgit v1.1