diff --git a/kernel/exit.c b/kernel/exit.c index 87a2d515de0d5be6ff29329e79077fb21e15f5b0..1f236ed375f83c2bf6b3c88c65d94d6ac9b2c0b3 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -454,7 +454,10 @@ static void exit_mm(void) mmap_read_unlock(mm); self.task = current; - self.next = xchg(&core_state->dumper.next, &self); + if (self.task->flags & PF_SIGNALED) + self.next = xchg(&core_state->dumper.next, &self); + else + self.task = NULL; /* * Implies mb(), the result of xchg() must be visible * to core_state->dumper.