From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Date: Wed, 25 May 2022 14:28:46 +0000 Subject: Re: [PATCH 07/16] signal: Wake up the designated parent Message-Id: <20220525142845.GA2687@redhat.com> List-Id: References: <871qwq5ucx.fsf_-_@email.froward.int.ebiederm.org> <20220518225355.784371-7-ebiederm@xmission.com> <20220524132553.GD14347@redhat.com> <20220524162808.GF14347@redhat.com> In-Reply-To: <20220524162808.GF14347@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, rjw@rjwysocki.net, mingo@kernel.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de, bigeasy@linutronix.de, Will Deacon , tj@kernel.org, linux-pm@vger.kernel.org, Peter Zijlstra , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Kees Cook , Jann Horn , linux-ia64@vger.kernel.org, Robert OCallahan , Kyle Huey , Richard Henderson , Ivan Kokshaysky , Matt Turner , Jason Wessel , Daniel Thompson , Douglas Anderson , Douglas Miller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras On 05/24, Oleg Nesterov wrote: > > On 05/24, Oleg Nesterov wrote: > > > > I fail to understand this patch... > > > > On 05/18, Eric W. Biederman wrote: > > > > > > Today if a process is ptraced only the ptracer will ever be woken up in > > > wait > > > > and why is this wrong? > > > > > Fixes: 75b95953a569 ("job control: Add @for_ptrace to do_notify_parent_cldstop()") > > > > how does this change fix 75b95953a569? > > OK, I guess you mean the 2nd do_notify_parent_cldstop() in ptrace_stop(), > the problematic case is current->ptrace = T. Right? > > I dislike this patch anyway, but let me think more about it. OK, now that I understand the problem, the patch doesn't look bad to me, although I'd ask to make the changelog more clear. After this change __wake_up_parent() can't accept any "parent" from p->parent thread group, but all callers look fine except ptrace_detach(). Oleg.