diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/linux32.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/process.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/syscall.c | 4 |
3 files changed, 3 insertions, 6 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 498a7ec656d8..9df3e330c37c 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -289,8 +289,6 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs) | |||
289 | 289 | ||
290 | clone_flags = regs.regs[4]; | 290 | clone_flags = regs.regs[4]; |
291 | newsp = regs.regs[5]; | 291 | newsp = regs.regs[5]; |
292 | if (!newsp) | ||
293 | newsp = regs.regs[29]; | ||
294 | parent_tidptr = (int __user *) regs.regs[6]; | 292 | parent_tidptr = (int __user *) regs.regs[6]; |
295 | 293 | ||
296 | /* Use __dummy4 instead of getting it off the stack, so that | 294 | /* Use __dummy4 instead of getting it off the stack, so that |
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, | |||
156 | *childregs = *regs; | 156 | *childregs = *regs; |
157 | childregs->regs[7] = 0; /* Clear error flag */ | 157 | childregs->regs[7] = 0; /* Clear error flag */ |
158 | childregs->regs[2] = 0; /* Child gets zero as return value */ | 158 | childregs->regs[2] = 0; /* Child gets zero as return value */ |
159 | childregs->regs[29] = usp; | 159 | if (usp) |
160 | childregs->regs[29] = usp; | ||
160 | ti->addr_limit = USER_DS; | 161 | ti->addr_limit = USER_DS; |
161 | 162 | ||
162 | p->thread.reg29 = (unsigned long) childregs; | 163 | p->thread.reg29 = (unsigned long) childregs; |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 7e1c70dab767..28daa66baa7b 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -86,7 +86,7 @@ save_static_function(sys_fork); | |||
86 | static int __used noinline | 86 | static int __used noinline |
87 | _sys_fork(nabi_no_regargs struct pt_regs regs) | 87 | _sys_fork(nabi_no_regargs struct pt_regs regs) |
88 | { | 88 | { |
89 | return do_fork(SIGCHLD, regs.regs[29], 0, NULL, NULL); | 89 | return do_fork(SIGCHLD, 0, 0, NULL, NULL); |
90 | } | 90 | } |
91 | 91 | ||
92 | save_static_function(sys_clone); | 92 | save_static_function(sys_clone); |
@@ -99,8 +99,6 @@ _sys_clone(nabi_no_regargs struct pt_regs regs) | |||
99 | 99 | ||
100 | clone_flags = regs.regs[4]; | 100 | clone_flags = regs.regs[4]; |
101 | newsp = regs.regs[5]; | 101 | newsp = regs.regs[5]; |
102 | if (!newsp) | ||
103 | newsp = regs.regs[29]; | ||
104 | parent_tidptr = (int __user *) regs.regs[6]; | 102 | parent_tidptr = (int __user *) regs.regs[6]; |
105 | #ifdef CONFIG_32BIT | 103 | #ifdef CONFIG_32BIT |
106 | /* We need to fetch the fifth argument off the stack. */ | 104 | /* We need to fetch the fifth argument off the stack. */ |