[PATCH RESEND linux next] signal: Update the comment on __send_signal_locked() in do_notify_parent()

From: jiang.kun2
Date: Wed Jun 11 2025 - 23:57:53 EST


From: Qiu Yutan <qiu.yutan@xxxxxxxxxx>

Update the comments for the call to __send_signal_locked()
in do_notify_parent() based on community discussions.

Suggested-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Signed-off-by: Qiu Yutan <qiu.yutan@xxxxxxxxxx>
Signed-off-by: Fan Yu <fan.yu9@xxxxxxxxxx>
Signed-off-by: Jiang Kun <jiang.kun2@xxxxxxxxxx>
---
kernel/signal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 148082db9a55..45dc60f8b833 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2252,8 +2252,8 @@ 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 the latter can wrongly change si_pid/si_uid
*/
if (valid_signal(sig) && sig)
__send_signal_locked(sig, &info, tsk->parent, PIDTYPE_TGID, false);
--
2.25.1