Skip to content

Commit

Permalink
um: don't bother with passing sp to do_fork() for fork(2)/vfork(2)
Browse files Browse the repository at this point in the history
copy_thread() on um will do the right thing when getting 0 for sp...

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Nov 29, 2012
1 parent c414467 commit 8cddebd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/um/kernel/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,19 @@

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);
}
Expand Down

0 comments on commit 8cddebd

Please sign in to comment.