um: don't bother with passing sp to do_fork() for fork(2)/vfork(2)
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Oct 2012 06:26:48 +0000 (02:26 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 29 Nov 2012 02:49:03 +0000 (21:49 -0500)
copy_thread() on um will do the right thing when getting 0 for sp...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/um/kernel/syscall.c

index a81f3705e90f6e23448ab827c5e980fa8306d9e6..3a875226c8efd4610f2a07b0d4dd801882255f8f 100644 (file)
 
 long sys_fork(void)
 {
-       return do_fork(SIGCHLD, UPT_SP(&current->thread.regs.regs),
+       return do_fork(SIGCHLD, 0,
                      &current->thread.regs, 0, NULL, NULL);
 }
 
 long sys_vfork(void)
 {
-       return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
-                     UPT_SP(&current->thread.regs.regs),
+       return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
                      &current->thread.regs, 0, NULL, NULL);
 }
 
 long sys_clone(unsigned long clone_flags, unsigned long newsp,
               void __user *parent_tid, void __user *child_tid)
 {
-       if (!newsp)
-               newsp = UPT_SP(&current->thread.regs.regs);
-
        return do_fork(clone_flags, newsp, &current->thread.regs, 0, parent_tid,
                      child_tid);
 }