diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-03 03:24:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-20 09:53:00 -0400 |
commit | ab286b21aa95c9c46421c59a96bf7745ba2866ca (patch) | |
tree | 303d66a7c97554f9fe6ccdb7f78813a6df24cfc3 | |
parent | 1cedd6925a0fe355315687427cbe3e63e9633b4d (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>
-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 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; |
45 | EXPORT_SYMBOL(start_thread); | ||
46 | |||
47 | static 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, ¤t->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(¤t->thread.regs.regs); | 46 | SUBARCH_EXECVE1(regs->regs); |
59 | #endif | 47 | #endif |
60 | task_unlock(current); | ||
61 | } | ||
62 | return error; | ||
63 | } | 48 | } |
49 | EXPORT_SYMBOL(start_thread); | ||
64 | 50 | ||
65 | long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) | 51 | long 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, ¤t->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, ¤t->thread.regs); |
85 | putname(filename); | 71 | putname(filename); |
86 | out: | 72 | out: |
87 | return error; | 73 | return error; |