Skip to content

Commit b4f6332

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull SIGCHLD fix from Eric Biederman: "Christof Meerwald reported that do_notify_parent has not been successfully populating si_pid and si_uid for multi-threaded processes. This is the one-liner fix. Strictly speaking a one-liner plus comment" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal: Avoid corrupting si_pid and si_uid in do_notify_parent
2 parents 25b1fa8 + 61e713b commit b4f6332

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kernel/signal.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,8 +1989,12 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
19891989
if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
19901990
sig = 0;
19911991
}
1992+
/*
1993+
* Send with __send_signal as si_pid and si_uid are in the
1994+
* parent's namespaces.
1995+
*/
19921996
if (valid_signal(sig) && sig)
1993-
__group_send_sig_info(sig, &info, tsk->parent);
1997+
__send_signal(sig, &info, tsk->parent, PIDTYPE_TGID, false);
19941998
__wake_up_parent(tsk, tsk->parent);
19951999
spin_unlock_irqrestore(&psig->siglock, flags);
19962000

0 commit comments

Comments
 (0)