aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/process.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 430ae39456e8..7d9c9750fd93 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags,
215/* 215/*
216 * sys_execve() executes a new program. 216 * sys_execve() executes a new program.
217 */ 217 */
218
219asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) 218asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
220{ 219{
221 int error; 220 int error;
222 char *filename; 221 char *filename;
223 struct pt_regs *regs = (struct pt_regs *)((&name) + 6); 222 struct pt_regs *regs = (struct pt_regs *)((&name) + 6);
224 223
225 lock_kernel();
226 filename = getname(name); 224 filename = getname(name);
227 error = PTR_ERR(filename); 225 error = PTR_ERR(filename);
228 if (IS_ERR(filename)) 226 if (IS_ERR(filename))
229 goto out; 227 return error;
230 error = do_execve(filename, argv, envp, regs); 228 error = do_execve(filename, argv, envp, regs);
231 putname(filename); 229 putname(filename);
232 out:
233 unlock_kernel();
234 return error; 230 return error;
235} 231}
236 232