patch-2.1.48 linux/arch/mips/kernel/syscall.c

Next file: linux/arch/mips/kernel/syscalls.h
Previous file: linux/arch/mips/kernel/irixelf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.47/linux/arch/mips/kernel/syscall.c linux/arch/mips/kernel/syscall.c
@@ -131,20 +131,21 @@
  */
 asmlinkage int sys_execve(struct pt_regs *regs)
 {
-	int res;
+	int error;
 	char * filename;
 
 	lock_kernel();
-	res = getname((char *) (long)regs->regs[4], &filename);
-	if (res)
+	filename = getname((char *) (long)regs->regs[4]);
+	error = PTR_ERR(filename);
+	if (IS_ERR(filename))
 		goto out;
-	res = do_execve(filename, (char **) (long)regs->regs[5],
-	                (char **) (long)regs->regs[6], regs);
+	error = do_execve(filename, (char **) (long)regs->regs[5],
+	                  (char **) (long)regs->regs[6], regs);
 	putname(filename);
 
 out:
 	unlock_kernel();
-	return res;
+	return error;
 }
 
 /*

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