Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340318
b: refs/heads/master
c: ea516b1
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Oct 22, 2012
1 parent 31e5e69 commit 3996729
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64c2f6596bd84b05a781baf034fdd56ce1192d36
refs/heads/master: ea516b11545afa5b1420621981c1411a62bef87e
9 changes: 4 additions & 5 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
} else {
CHECK_FULL_REGS(regs);
*childregs = *regs;
childregs->gpr[1] = usp;
if (usp)
childregs->gpr[1] = usp;
p->thread.regs = childregs;
childregs->gpr[3] = 0; /* Result from fork() */
if (clone_flags & CLONE_SETTLS) {
Expand Down Expand Up @@ -1030,23 +1031,21 @@ int sys_clone(unsigned long clone_flags, unsigned long usp,
int __user *child_tidp, int p6,
struct pt_regs *regs)
{
if (usp == 0)
usp = regs->gpr[1]; /* stack pointer for child */
return do_fork(clone_flags, usp, regs, 0, parent_tidp, child_tidp);
}

int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5, unsigned long p6,
struct pt_regs *regs)
{
return do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL, NULL);
return do_fork(SIGCHLD, 0, regs, 0, NULL, NULL);
}

int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5, unsigned long p6,
struct pt_regs *regs)
{
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gpr[1],
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
regs, 0, NULL, NULL);
}

Expand Down

0 comments on commit 3996729

Please sign in to comment.