patch-2.1.26 linux/arch/i386/kernel/sys_i386.c

Next file: linux/arch/i386/kernel/time.c
Previous file: linux/arch/i386/kernel/ioport.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.25/linux/arch/i386/kernel/sys_i386.c linux/arch/i386/kernel/sys_i386.c
@@ -32,11 +32,11 @@
 
 	lock_kernel();
 	error = do_pipe(fd);
+	unlock_kernel();
 	if (!error) {
 		if (copy_to_user(fildes, fd, 2*sizeof(int)))
 			error = -EFAULT;
 	}
-	unlock_kernel();
 	return error;
 }
 
@@ -46,6 +46,7 @@
  * 4 system call parameters, so these system calls used a memory
  * block for parameter passing..
  */
+
 struct mmap_arg_struct {
 	unsigned long addr;
 	unsigned long len;
@@ -87,13 +88,12 @@
 asmlinkage int old_select(struct sel_arg_struct *arg)
 {
 	struct sel_arg_struct a;
-	int ret = -EFAULT;
+	int ret;
 
-	lock_kernel();
 	if (copy_from_user(&a, arg, sizeof(a)))
-		goto out;
+		return -EFAULT;
+	lock_kernel();
 	ret = sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
-out:
 	unlock_kernel();
 	return ret;
 }

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]