X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fsignal.c;h=a820be85ecbbae86211abad65fcaf416213cf78c;hb=918425d07b2fe2087ee7dabf90e69a17e914649c;hp=273d10c29d5f9bb0cb3219c07f87faae1c06ac1f;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 273d10c29..a820be85e 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -34,8 +35,6 @@ extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); -extern asmlinkage void do_syscall_trace(void); - /* * Atomically swap in the new signal mask, and wait for a signal. */ @@ -232,7 +231,7 @@ asmlinkage void sys_sigreturn(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" @@ -549,6 +548,19 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) } #endif + /* + * 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; @@ -558,6 +570,7 @@ asmlinkage int do_signal(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,