diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-03 03:24:18 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-09-27 18:04:26 +0200 |
commit | 424597921ac1fc2a475a656ea5895cbe78f25d0d (patch) | |
tree | ddfc7706211c7f49d3367874af444e9eee3dc3bf /arch/um/kernel/exec.c | |
parent | 5e19997a742c7c8203be628a7a69babc3bcf01a4 (diff) |
um: take cleaning singlestep to start_thread()
... assuming it's needed to be done at all
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/um/kernel/exec.c')
-rw-r--r-- | arch/um/kernel/exec.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 6cade936636..4cab0c78684 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c @@ -41,32 +41,18 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) { PT_REGS_IP(regs) = eip; PT_REGS_SP(regs) = esp; -} -EXPORT_SYMBOL(start_thread); - -static long execve1(const char *file, - const char __user *const __user *argv, - const char __user *const __user *env) -{ - long error; - - error = do_execve(file, argv, env, ¤t->thread.regs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; + current->ptrace &= ~PT_DTRACE; #ifdef SUBARCH_EXECVE1 - SUBARCH_EXECVE1(¤t->thread.regs.regs); + SUBARCH_EXECVE1(regs->regs); #endif - task_unlock(current); - } - return error; } +EXPORT_SYMBOL(start_thread); long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) { long err; - err = execve1(file, argv, env); + err = do_execve(file, argv, env, ¤t->thread.regs); if (!err) UML_LONGJMP(current->thread.exec_buf, 1); return err; @@ -81,7 +67,7 @@ long sys_execve(const char __user *file, const char __user *const __user *argv, filename = getname(file); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; - error = execve1(filename, argv, env); + error = do_execve(filename, argv, env, ¤t->thread.regs); putname(filename); out: return error; |