diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-27 11:52:32 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:33:01 -0500 |
commit | 64b3122df48b81a40366a11f299ab819138c96e8 (patch) | |
tree | 43c187576da8dc406c9edb8e0d3fe4e471032a53 /arch/mips/kernel/process.c | |
parent | 974fdb3c20e72e9c0612bc038c968e420d8f9665 (diff) |
mips: take the "zero newsp means inherit the parent's one" to copy_thread()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index a11c6f9fdd5e..a33d2ef8f273 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -156,7 +156,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, *childregs = *regs; childregs->regs[7] = 0; /* Clear error flag */ childregs->regs[2] = 0; /* Child gets zero as return value */ - childregs->regs[29] = usp; + if (usp) + childregs->regs[29] = usp; ti->addr_limit = USER_DS; p->thread.reg29 = (unsigned long) childregs; |