kernel/signal.c: protect the traced SIGNAL_UNKILLABLE tasks from SIGKILL
[linux-2.6-microblaze.git] / kernel / signal.c
index aa1fb9f..be59131 100644 (file)
@@ -94,13 +94,15 @@ static int sig_ignored(struct task_struct *t, int sig, bool force)
        if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
                return 0;
 
-       if (!sig_task_ignored(t, sig, force))
-               return 0;
-
        /*
-        * Tracers may want to know about even ignored signals.
+        * Tracers may want to know about even ignored signal unless it
+        * is SIGKILL which can't be reported anyway but can be ignored
+        * by SIGNAL_UNKILLABLE task.
         */
-       return !t->ptrace;
+       if (t->ptrace && sig != SIGKILL)
+               return 0;
+
+       return sig_task_ignored(t, sig, force);
 }
 
 /*