From: Qiu Yutan <qiu.yutan@zte.com.cn>
Update the comments for the call to __send_signal_locked()
in do_notify_parent() based on community discussions.
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Qiu Yutan <qiu.yutan@zte.com.cn>
Signed-off-by: Fan Yu <fan.yu9@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
---
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