Re: [PATCH linux-next v2] signal: clarify __send_signal_locked comment in do_notify_parent

From: Oleg Nesterov
Date: Tue Jul 29 2025 - 11:42:01 EST


On 07/29, fan.yu9@xxxxxxxxxx wrote:
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2252,8 +2252,10 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
> sig = 0;
> }
> /*
> - * Send with __send_signal as si_pid and si_uid are in the
> - * parent's namespaces.
> + * Use __send_signal_locked() instead of send_signal_locked()
> + * because si_pid and si_uid are already in the parent's
> + * namespace. send_signal_locked() would incorrectly modify
> + * them when crossing PID/user namespaces.
> */

Somehow I'd still prefer the previous version which simply kills this comment,
but as I said I won't argue.

However. It seems to me that the new comment adds another confusion. I'll try
to recheck tomorrow, I am very busy today.

Oleg.