Re: [PATCH 07/16] signal: Wake up the designated parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
- Subject: Re: [PATCH 07/16] signal: Wake up the designated parent
- From: Oleg Nesterov <oleg@xxxxxxxxxx>
- Date: Tue, 7 Jun 2022 17:26:54 +0200
- Cc: linux-kernel@xxxxxxxxxxxxxxx, rjw@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, vincent.guittot@xxxxxxxxxx, dietmar.eggemann@xxxxxxx, rostedt@xxxxxxxxxxx, mgorman@xxxxxxx, bigeasy@xxxxxxxxxxxxx, Will Deacon <will@xxxxxxxxxx>, tj@xxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx>, Johannes Berg <johannes@xxxxxxxxxxxxxxxx>, linux-um@xxxxxxxxxxxxxxxxxxx, Chris Zankel <chris@xxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, Kees Cook <keescook@xxxxxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Robert OCallahan <roc@xxxxxxxxx>, Kyle Huey <khuey@xxxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxxxxxx>, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Jason Wessel <jason.wessel@xxxxxxxxxxxxx>, Daniel Thompson <daniel.thompson@xxxxxxxxxx>, Douglas Anderson <dianders@xxxxxxxxxxxx>, Douglas Miller <dougmill@xxxxxxxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>
- In-reply-to: <87a6ap30lh.fsf@email.froward.int.ebiederm.org>
- References: <871qwq5ucx.fsf_-_@email.froward.int.ebiederm.org> <20220518225355.784371-7-ebiederm@xmission.com> <20220524132553.GD14347@redhat.com> <20220524162808.GF14347@redhat.com> <20220525142845.GA2687@redhat.com> <87a6ap30lh.fsf@email.froward.int.ebiederm.org>
- User-agent: Mutt/1.5.24 (2015-08-30)
On 06/06, Eric W. Biederman wrote:
>
> Which if I have had enough sleep reduces this patch to just:
>
> diff --git a/kernel/exit.c b/kernel/exit.c
> index f072959fcab7..c8156366b722 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -1431,8 +1431,10 @@ static int child_wait_callback(wait_queue_entry_t *wait, unsigned mode,
> if (!eligible_pid(wo, p))
> return 0;
>
> - if ((wo->wo_flags & __WNOTHREAD) && wait->private != p->parent)
> - return 0;
> + if ((wo->wo_flags & __WNOTHREAD) &&
> + (wait->private != p->parent) &&
> + (wait->private != p->real_parent))
> + return 0;
>
> return default_wake_function(wait, mode, sync, key);
> }
>
>
> I think that solves the issue without missing wake-ups without adding
> any more.
Agreed, and looks much simpler.
> For the same set of reasons it looks like the __wake_up_parent in
> __ptrace_detach is just simply dead code. I don't think there is a case
> where when !ptrace_reparented the thread that is the real_parent can
> sleep in do_wait when the thread that was calling ptrace could not.
Yes... this doesn't really differ from the case when one thread reaps
a natural child and another thread sleep in do_wait().
> That needs a very close look to confirm.
Yes.
Oleg.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]