coredump: only SIGKILL should interrupt the coredumping task
[linux-2.6-block.git] / kernel / signal.c
index 27ece019bd0a6d4e3dddb275cab0662447766daf..cede58910f9c6629304cdddce66e0edf42a40148 100644 (file)
@@ -854,12 +854,14 @@ static void ptrace_trap_notify(struct task_struct *t)
  * Returns true if the signal should be actually delivered, otherwise
  * it should be dropped.
  */
-static int prepare_signal(int sig, struct task_struct *p, bool force)
+static bool prepare_signal(int sig, struct task_struct *p, bool force)
 {
        struct signal_struct *signal = p->signal;
        struct task_struct *t;
 
-       if (unlikely(signal->flags & SIGNAL_GROUP_EXIT)) {
+       if (signal->flags & (SIGNAL_GROUP_EXIT | SIGNAL_GROUP_COREDUMP)) {
+               if (signal->flags & SIGNAL_GROUP_COREDUMP)
+                       return sig == SIGKILL;
                /*
                 * The process is in the middle of dying, nothing to do.
                 */