mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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>
This commit is contained in:
parent
c4144670fd
commit
8cddebd767
1 changed files with 2 additions and 6 deletions
|
@ -16,23 +16,19 @@
|
||||||
|
|
||||||
long sys_fork(void)
|
long sys_fork(void)
|
||||||
{
|
{
|
||||||
return do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs),
|
return do_fork(SIGCHLD, 0,
|
||||||
¤t->thread.regs, 0, NULL, NULL);
|
¤t->thread.regs, 0, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
long sys_vfork(void)
|
long sys_vfork(void)
|
||||||
{
|
{
|
||||||
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
|
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
|
||||||
UPT_SP(¤t->thread.regs.regs),
|
|
||||||
¤t->thread.regs, 0, NULL, NULL);
|
¤t->thread.regs, 0, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
long sys_clone(unsigned long clone_flags, unsigned long newsp,
|
long sys_clone(unsigned long clone_flags, unsigned long newsp,
|
||||||
void __user *parent_tid, void __user *child_tid)
|
void __user *parent_tid, void __user *child_tid)
|
||||||
{
|
{
|
||||||
if (!newsp)
|
|
||||||
newsp = UPT_SP(¤t->thread.regs.regs);
|
|
||||||
|
|
||||||
return do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid,
|
return do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid,
|
||||||
child_tid);
|
child_tid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue