patch-2.4.0-test2 linux/arch/alpha/kernel/osf_sys.c

Next file: linux/arch/alpha/kernel/pci.c
Previous file: linux/arch/alpha/kernel/machvec_impl.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -230,7 +230,6 @@
 	struct file *file = NULL;
 	unsigned long ret = -EBADF;
 
-	down(&current->mm->mmap_sem);
 	lock_kernel();
 #if 0
 	if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
@@ -243,12 +242,13 @@
 			goto out;
 	}
 	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+	down(&current->mm->mmap_sem);
 	ret = do_mmap(file, addr, len, prot, flags, off);
+	up(&current->mm->mmap_sem);
 	if (file)
 		fput(file);
 out:
 	unlock_kernel();
-	up(&current->mm->mmap_sem);
 	return ret;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)