Commit 21e25205 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Christian Brauner
Browse files

pidfd: don't do_notify_pidfd() if !thread_group_empty()



do_notify_pidfd() makes no sense until the whole thread group exits, change
do_notify_parent() to check thread_group_empty().

This avoids the unnecessary do_notify_pidfd() when tsk is not a leader, or
it exits before other threads, or it has a ptraced EXIT_ZOMBIE sub-thread.

Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20240127132407.GA29136@redhat.com


Reviewed-by: default avatarTycho Andersen <tandersen@netflix.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent cdefbf23
Supports Markdown
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