X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fsignal32.c;h=a449a5651c42ea2abc19041e1587fe5de65af877;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=0c4ee2afef6873ca86d7dc7e882d7305f3ec883c;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 0c4ee2afe..a449a5651 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -18,9 +18,11 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -40,8 +42,6 @@ extern asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs); -extern asmlinkage void do_syscall_trace(void); - /* 32-bit compatibility types */ #define _NSIG_BPW32 32 @@ -392,7 +392,7 @@ asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) * Don't let your children do this ... */ if (current_thread_info()->flags & TIF_SYSCALL_TRACE) - do_syscall_trace(); + do_syscall_trace(®s, 1); __asm__ __volatile__( "move\t$29, %0\n\t" "j\tsyscall_exit" @@ -574,9 +574,7 @@ static inline void setup_frame(struct k_sigaction * ka, struct pt_regs *regs, return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } static inline void setup_rt_frame(struct k_sigaction * ka, @@ -647,9 +645,7 @@ static inline void setup_rt_frame(struct k_sigaction * ka, return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } static inline void handle_signal(unsigned long sig, siginfo_t *info, @@ -696,6 +692,19 @@ asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs) siginfo_t info; int signr; + /* + * We want the common case to go fast, which is why we may in certain + * cases get here from kernel mode. Just return without doing anything + * if so. + */ + if (!user_mode(regs)) + return 1; + + if (current->flags & PF_FREEZE) { + refrigerator(0); + goto no_signal; + } + if (!oldset) oldset = ¤t->blocked; @@ -705,6 +714,7 @@ asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs) return 1; } +no_signal: /* * Who's code doesn't conform to the restartable syscall convention * dies here!!! The li instruction, a single machine instruction,