From: Sukadev Bhattiprolu Date: Thu, 2 Apr 2009 23:58:09 +0000 (-0700) Subject: signals: SI_USER: Masquerade si_pid when crossing pid ns boundary X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6588c1e3ff01418acafd938db0740e3477dc8cb7;p=linux-2.6-omap-h63xx.git signals: SI_USER: Masquerade si_pid when crossing pid ns boundary When sending a signal to a descendant namespace, set ->si_pid to 0 since the sender does not have a pid in the receiver's namespace. Note: - If rt_sigqueueinfo() sets si_code to SI_USER when sending a signal across a pid namespace boundary, the value in ->si_pid will be cleared to 0. Signed-off-by: Sukadev Bhattiprolu Cc: Oleg Nesterov Cc: Roland McGrath Cc: "Eric W. Biederman" Cc: Daniel Lezcano Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index ba3da25f0ee..d8034737db4 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -883,6 +883,8 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, break; default: copy_siginfo(&q->info, info); + if (from_ancestor_ns) + q->info.si_pid = 0; break; } } else if (!is_si_special(info)) {