aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-22 09:14:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-22 09:14:19 -0700
commit44b912cd0b55777796c5ae8ae857bd1d5ff83ed5 (patch)
tree67a4e12799476ccfa4895b13f496e2b44a553625
parentMerge tag 'for-5.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux (diff)
parentpidfd: fix a poll race when setting exit_state (diff)
downloadlinux-dev-44b912cd0b55777796c5ae8ae857bd1d5ff83ed5.tar.xz
linux-dev-44b912cd0b55777796c5ae8ae857bd1d5ff83ed5.zip
Merge tag 'for-linus-20190722' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux
Pull pidfd polling fix from Christian Brauner: "A fix for pidfd polling. It ensures that the task's exit state is visible to all waiters" * tag 'for-linus-20190722' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: pidfd: fix a poll race when setting exit_state
-rw-r--r--kernel/exit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index a75b6a7f458a..4436158a6d30 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -720,6 +720,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL);
+ tsk->exit_state = EXIT_ZOMBIE;
if (unlikely(tsk->ptrace)) {
int sig = thread_group_leader(tsk) &&
thread_group_empty(tsk) &&