diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-06-12 08:17:23 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-06-12 08:17:23 +0000 |
commit | 677b8443f717369af3a4270ba92e133c36650a08 (patch) | |
tree | 0589971b7e79f9e7fba2d62a2eae43fe123e040a /arch | |
parent | 36c9f163c85f5ecb2564ef8159c0d16c25d04121 (diff) |
Fix misscomputation of signal stackframe address in setup_frame().
Add missing return that was causing all processes receiving a
signal to be terminated with a SIGSEGV.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/signal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 304dc6418..4f975af1a 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -155,13 +155,13 @@ static void setup_frame(struct sigaction * sa, struct pt_regs *regs, struct sigcontext *sc; int i; + /* Align the stackframe to an adequate boundary for the architecture. */ frame = (struct sc *) (long) regs->regs[29]; frame--; + frame = (struct sc *)((unsigned long)frame & ALMASK); - /* We realign the stack to an adequate boundary for the architecture. */ - if (verify_area(VERIFY_WRITE, frame, sizeof (struct sc))) + if (verify_area(VERIFY_WRITE, frame, sizeof (*frame))) goto segv_and_exit; - frame = (struct sc *)((unsigned long)frame & ALMASK); sc = &frame->scc; /* @@ -206,6 +206,7 @@ static void setup_frame(struct sigaction * sa, struct pt_regs *regs, regs->regs[31] = (unsigned long) frame->code; /* Return address */ regs->cp0_epc = (unsigned long) sa->sa_handler; /* "return" to the first handler */ regs->regs[25] = regs->cp0_epc; /* PIC shit... */ + return; segv_and_exit: lock_kernel(); |