Re: [PATCH linux-next] signal: Remove outdated __send_signal references in do_notify_parent
From: Oleg Nesterov
Date: Mon Jul 28 2025 - 11:59:51 EST
On 07/28, Thomas Gleixner wrote:
>
> > --- a/kernel/signal.c
> > +++ b/kernel/signal.c
> > @@ -2251,10 +2251,7 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
> > if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
> > sig = 0;
> > }
> > - /*
> > - * Send with __send_signal as si_pid and si_uid are in the
> > - * parent's namespaces.
> > - */
> > +
>
> Why are you removing the complete comment instead of just renaming the
> stale reference?
Then the comment should be updated to explain that we have to use
__send_signal_locked(), not send_signal_locked(), because the latter
can wrongly change si_pid/si_uid which are in the parent's namespace.
> commit 61e713bdca36 ("signal: Avoid corrupting si_pid and si_uid in
> do_notify_parent") put that comment there for a reason.
Yes, but the comment was a bit confusing, imo. I don't think it makes
the code more clear.
But I am fine either way.
Oleg.