diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-17 02:26:48 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 21:49:03 -0500 |
commit | 8cddebd767c5059257022cfbc2ac53fd81c09c94 (patch) | |
tree | dd8339b29ab65d56526239f6e010f833656984e3 /arch/um | |
parent | c4144670fd9b34d6eae22c9f83751745898e8243 (diff) |
um: don't bother with passing sp to do_fork() for fork(2)/vfork(2)
copy_thread() on um will do the right thing when getting 0 for sp...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/syscall.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index a81f3705e90f..3a875226c8ef 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c | |||
@@ -16,23 +16,19 @@ | |||
16 | 16 | ||
17 | long sys_fork(void) | 17 | long sys_fork(void) |
18 | { | 18 | { |
19 | return do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), | 19 | return do_fork(SIGCHLD, 0, |
20 | ¤t->thread.regs, 0, NULL, NULL); | 20 | ¤t->thread.regs, 0, NULL, NULL); |
21 | } | 21 | } |
22 | 22 | ||
23 | long sys_vfork(void) | 23 | long sys_vfork(void) |
24 | { | 24 | { |
25 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, | 25 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, |
26 | UPT_SP(¤t->thread.regs.regs), | ||
27 | ¤t->thread.regs, 0, NULL, NULL); | 26 | ¤t->thread.regs, 0, NULL, NULL); |
28 | } | 27 | } |
29 | 28 | ||
30 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | 29 | long sys_clone(unsigned long clone_flags, unsigned long newsp, |
31 | void __user *parent_tid, void __user *child_tid) | 30 | void __user *parent_tid, void __user *child_tid) |
32 | { | 31 | { |
33 | if (!newsp) | ||
34 | newsp = UPT_SP(¤t->thread.regs.regs); | ||
35 | |||
36 | return do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, | 32 | return do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, |
37 | child_tid); | 33 | child_tid); |
38 | } | 34 | } |