summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-13 01:53:13 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-13 01:53:13 +0000
commit9a901683563d4ae67d33c20cd9bd0b24f311d687 (patch)
tree3277f3a617ed1075a9486aaa3c6414cdcba08018 /arch
parent677b8443f717369af3a4270ba92e133c36650a08 (diff)
Add kernel locking to setup_irix_frame().
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/irixsig.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index b2d7cbe49..7b0ca736b 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -81,7 +81,7 @@ static void setup_irix_frame(struct sigaction * sa, struct pt_regs *regs,
sp &= ~(0xf);
ctx = (struct sigctx_irix5 *) sp;
if (!access_ok(VERIFY_WRITE, ctx, sizeof(*ctx)))
- do_exit(SIGSEGV);
+ goto segv_and_exit;
__put_user(0, &ctx->weird_fpu_thing);
__put_user(~(0x00000001), &ctx->rmask);
@@ -112,6 +112,12 @@ static void setup_irix_frame(struct sigaction * sa, struct pt_regs *regs,
regs->regs[6] = regs->regs[29] = sp;
regs->regs[7] = (unsigned long) sa->sa_handler;
regs->regs[25] = regs->cp0_epc = current->tss.irix_trampoline;
+ return;
+
+segv_and_exit:
+ lock_kernel();
+ do_exit(SIGSEGV);
+ unlock_kernel();
}
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,