patch-2.1.116 linux/arch/m68k/kernel/sys_m68k.c

Next file: linux/arch/m68k/mac/adb-bus.c
Previous file: linux/arch/m68k/kernel/m68k_ksyms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.115/linux/arch/m68k/kernel/sys_m68k.c linux/arch/m68k/kernel/sys_m68k.c
@@ -66,12 +66,11 @@
 	struct file * file = NULL;
 	struct mmap_arg_struct a;
 
-	down(&current->mm->mmap_sem);
-	lock_kernel();
-	error = -EFAULT;
 	if (copy_from_user(&a, arg, sizeof(a)))
-		goto out;
+		return -EFAULT;
 
+	down(&current->mm->mmap_sem);
+	lock_kernel();
 	if (!(a.flags & MAP_ANONYMOUS)) {
 		error = -EBADF;
 		file = fget(a.fd);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov