Commit 44b912cd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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) &&