summaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300/kernel/process.c')
-rw-r--r--arch/mn10300/kernel/process.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 892cce8..ec8a21d 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -275,16 +275,12 @@ asmlinkage long sys_execve(char __user *name,
char *filename;
int error;
- lock_kernel();
-
filename = getname(name);
error = PTR_ERR(filename);
- if (!IS_ERR(filename)) {
- error = do_execve(filename, argv, envp, __frame);
- putname(filename);
- }
-
- unlock_kernel();
+ if (IS_ERR(filename))
+ return error;
+ error = do_execve(filename, argv, envp, __frame);
+ putname(filename);
return error;
}
OpenPOWER on IntegriCloud