Commit 44b912cd authored by Linus Torvalds's avatar Linus Torvalds

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
parents 21c730d7 b191d649
...@@ -720,6 +720,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead) ...@@ -720,6 +720,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
if (group_dead) if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL); kill_orphaned_pgrp(tsk->group_leader, NULL);
tsk->exit_state = EXIT_ZOMBIE;
if (unlikely(tsk->ptrace)) { if (unlikely(tsk->ptrace)) {
int sig = thread_group_leader(tsk) && int sig = thread_group_leader(tsk) &&
thread_group_empty(tsk) && thread_group_empty(tsk) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment