aboutsummaryrefslogtreecommitdiff
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
parent21c730d7347126886c40453feb973161f4ae3fb3 (diff)
parentb191d6491be67cef2b3fa83015561caca1394ab9 (diff)
downloadlinux-stericsson-44b912cd0b55777796c5ae8ae857bd1d5ff83ed5.tar.gz
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) &&