Skip to content

Commit eccc876

Browse files
committed
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull core dump fix from Al Viro: "Fix for multithreaded coredump playing fast and loose with getting registers of secondary threads; if a secondary gets caught in the middle of exit(2), the conditition it will be stopped in for dumper to examine might be unusual enough for things to go wrong. Quite a few architectures are fine with that, but some are not." * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: don't dump the threads that had been already exiting when zapped.
2 parents e2f0c56 + 77f6ab8 commit eccc876

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

kernel/exit.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,10 @@ static void exit_mm(void)
454454
mmap_read_unlock(mm);
455455

456456
self.task = current;
457-
self.next = xchg(&core_state->dumper.next, &self);
457+
if (self.task->flags & PF_SIGNALED)
458+
self.next = xchg(&core_state->dumper.next, &self);
459+
else
460+
self.task = NULL;
458461
/*
459462
* Implies mb(), the result of xchg() must be visible
460463
* to core_state->dumper.

0 commit comments

Comments
 (0)