aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-03 03:24:18 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-20 09:53:00 -0400
commitab286b21aa95c9c46421c59a96bf7745ba2866ca (patch)
tree303d66a7c97554f9fe6ccdb7f78813a6df24cfc3 /arch/um
parent1cedd6925a0fe355315687427cbe3e63e9633b4d (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')
-rw-r--r--arch/um/kernel/exec.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 6cade9366364..4cab0c78684b 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)
41{ 41{
42 PT_REGS_IP(regs) = eip; 42 PT_REGS_IP(regs) = eip;
43 PT_REGS_SP(regs) = esp; 43 PT_REGS_SP(regs) = esp;
44} 44 current->ptrace &= ~PT_DTRACE;
45EXPORT_SYMBOL(start_thread);
46
47static long execve1(const char *file,
48 const char __user *const __user *argv,
49 const char __user *const __user *env)
50{
51 long error;
52
53 error = do_execve(file, argv, env, &current->thread.regs);
54 if (error == 0) {
55 task_lock(current);
56 current->ptrace &= ~PT_DTRACE;
57#ifdef SUBARCH_EXECVE1 45#ifdef SUBARCH_EXECVE1
58 SUBARCH_EXECVE1(&current->thread.regs.regs); 46 SUBARCH_EXECVE1(regs->regs);
59#endif 47#endif
60 task_unlock(current);
61 }
62 return error;
63} 48}
49EXPORT_SYMBOL(start_thread);
64 50
65long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) 51long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env)
66{ 52{
67 long err; 53 long err;
68 54
69 err = execve1(file, argv, env); 55 err = do_execve(file, argv, env, &current->thread.regs);
70 if (!err) 56 if (!err)
71 UML_LONGJMP(current->thread.exec_buf, 1); 57 UML_LONGJMP(current->thread.exec_buf, 1);
72 return err; 58 return err;
@@ -81,7 +67,7 @@ long sys_execve(const char __user *file, const char __user *const __user *argv,
81 filename = getname(file); 67 filename = getname(file);
82 error = PTR_ERR(filename); 68 error = PTR_ERR(filename);
83 if (IS_ERR(filename)) goto out; 69 if (IS_ERR(filename)) goto out;
84 error = execve1(filename, argv, env); 70 error = do_execve(filename, argv, env, &current->thread.regs);
85 putname(filename); 71 putname(filename);
86 out: 72 out:
87 return error; 73 return error;