coredump: ensure all coredumping tasks have SIGNAL_GROUP_COREDUMP
[linux-2.6-block.git] / kernel / signal.c
index f2cbd4ed5cd48403c910906194c834ad183f4c2f..c0b01fe24bbd3fae555b2e479e86f9199f3a7c3b 100644 (file)
@@ -788,7 +788,7 @@ static bool prepare_signal(int sig, struct task_struct *p, bool force)
        sigset_t flush;
 
        if (signal->flags & (SIGNAL_GROUP_EXIT | SIGNAL_GROUP_COREDUMP)) {
-               if (signal->flags & SIGNAL_GROUP_COREDUMP)
+               if (!(signal->flags & SIGNAL_GROUP_EXIT))
                        return sig == SIGKILL;
                /*
                 * The process is in the middle of dying, nothing to do.