aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorEric W. Biederman <[email protected]>2020-07-01 07:30:06 -0500
committerEric W. Biederman <[email protected]>2020-07-07 11:58:17 -0500
commit38fd525a4c61e7ecdc9ad4dcbf7b767d0a007962 (patch)
tree1f255a978951c7c7464626f5de640d6ad5a420ac /lib/memory-notifier-error-inject.c
parent1c340ead18ee4b4a84357abdef6d4f39ee08328b (diff)
exit: Factor thread_group_exited out of pidfd_poll
Create an independent helper thread_group_exited which returns true when all threads have passed exit_notify in do_exit. AKA all of the threads are at least zombies and might be dead or completely gone. Create this helper by taking the logic out of pidfd_poll where it is already tested, and adding a READ_ONCE on the read of task->exit_state. I will be changing the user mode driver code to use this same logic to know when a user mode driver needs to be restarted. Place the new helper thread_group_exited in kernel/exit.c and EXPORT it so it can be used by modules. Link: https://lkml.kernel.org/r/[email protected] Acked-by: Christian Brauner <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Tested-by: Alexei Starovoitov <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions