Re: [PATCH 1/1] pidfd: don't do_notify_pidfd() if !thread_group_empty()
From: Tycho Andersen
Date: Sat Jan 27 2024 - 12:22:48 EST
On Sat, Jan 27, 2024 at 02:21:05PM +0100, Oleg Nesterov wrote:
> 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: Oleg Nesterov <oleg@xxxxxxxxxx>
Looks good to me, thanks.
Reviewed-by: Tycho Andersen <tandersen@xxxxxxxxxxx>
Tycho