Re: [PATCH] pidfd: exit: kill the no longer used thread_group_exited()

From: Christian Brauner
Date: Wed Feb 07 2024 - 03:46:21 EST


On Tue, Feb 06, 2024 at 10:04:08AM -0700, Tycho Andersen wrote:
> On Mon, Feb 05, 2024 at 06:43:47PM +0100, Oleg Nesterov wrote:
> > It was used by pidfd_poll() but now it has no callers.
> >
> > If it finally finds a modular user we can revert this change, but note
> > that the comment above this helper and the changelog in 38fd525a4c61
> > ("exit: Factor thread_group_exited out of pidfd_poll") are not accurate,
> > thread_group_exited() won't return true if all other threads have passed
> > exit_notify() and are zombies, it returns true only when all other threads
> > are completely gone. Not to mention that it can only work if the task
> > identified by @pid is a thread-group leader.
> >
> > Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> Reviewed-by: Tycho Andersen <tandersen@xxxxxxxxxxx>

On Tue, Feb 06, 2024 at 10:03:41AM -0700, Tycho Andersen wrote:
> On Mon, Feb 05, 2024 at 03:13:48PM +0100, Oleg Nesterov wrote:
> > rather than wake_up_all(). This way do_notify_pidfd() won't wakeup the
> > POLLHUP-only waiters which wait for pid_task() == NULL.
> >
> > TODO:
> > - as Christian pointed out, this asks for the new wake_up_all_poll()
> > helper, it can already have other users.
> >
> > - we can probably discriminate the PIDFD_THREAD and non-PIDFD_THREAD
> > waiters, but this needs more work. See
> > https://lore.kernel.org/all/20240205140848.GA15853@xxxxxxxxxx/
> >
> > Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> Reviewed-by: Tycho Andersen <tandersen@xxxxxxxxxxx>

I updated the trailers with your RVBs.