diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /arch/mips/kernel/irixsig.c | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'arch/mips/kernel/irixsig.c')
-rw-r--r-- | arch/mips/kernel/irixsig.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 693d72110..7ec7b175c 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -3,7 +3,7 @@ * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * - * $Id: irixsig.c,v 1.10 1999/01/03 17:50:50 ralf Exp $ + * $Id: irixsig.c,v 1.11 1999/06/17 13:25:46 ralf Exp $ */ #include <linux/kernel.h> @@ -114,17 +114,17 @@ static void setup_irix_frame(struct k_sigaction *ka, struct pt_regs *regs, dump_irix5_sigctx(ctx); #endif - regs->regs[5] = 0; /* XXX sigcode XXX */ regs->regs[4] = (unsigned long) signr; + regs->regs[5] = 0; /* XXX sigcode XXX */ regs->regs[6] = regs->regs[29] = sp; regs->regs[7] = (unsigned long) ka->sa.sa_handler; - regs->regs[25] = regs->cp0_epc = current->tss.irix_trampoline; + regs->regs[25] = regs->cp0_epc = (unsigned long) ka->sa.sa_restorer; return; segv_and_exit: - lock_kernel(); - do_exit(SIGSEGV); - unlock_kernel(); + if (signr == SIGSEGV) + ka->sa.sa_handler = SIG_DFL; + force_sig(SIGSEGV, current); } static void inline @@ -300,11 +300,12 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs) return 0; } -asmlinkage unsigned long irix_sigreturn(struct pt_regs *regs) +asmlinkage void +irix_sigreturn(struct pt_regs *regs) { struct sigctx_irix5 *context, *magic; unsigned long umask, mask; - u64 *fregs, res; + u64 *fregs; int sig, i, base = 0; sigset_t blocked; @@ -365,11 +366,7 @@ asmlinkage unsigned long irix_sigreturn(struct pt_regs *regs) /* Unreached */ badframe: - lock_kernel(); - do_exit(SIGSEGV); - unlock_kernel(); - - return res; + force_sig(SIGSEGV, current); } struct sigact_irix5 { @@ -390,7 +387,7 @@ static inline void dump_sigact_irix5(struct sigact_irix5 *p) asmlinkage int irix_sigaction(int sig, const struct sigaction *act, - struct sigaction *oact, unsigned long trampoline) + struct sigaction *oact, void *trampoline) { struct k_sigaction new_ka, old_ka; int ret; @@ -410,15 +407,14 @@ irix_sigaction(int sig, const struct sigaction *act, return -EFAULT; __copy_from_user(&mask, &act->sa_mask, sizeof(sigset_t)); - new_ka.ka_restorer = NULL; - } - /* - * Hmmm... methinks IRIX libc always passes a valid trampoline - * value for all invocations of sigaction. Will have to - * investigate. POSIX POSIX, die die die... - */ - current->tss.irix_trampoline = trampoline; + /* + * Hmmm... methinks IRIX libc always passes a valid trampoline + * value for all invocations of sigaction. Will have to + * investigate. POSIX POSIX, die die die... + */ + new_ka.sa.sa_restorer = trampoline; + } /* XXX Implement SIG_SETMASK32 for IRIX compatibility */ ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); |