From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: [PATCH 2/9] sig: Fix SI_USER si_pid Date: Wed, 12 Dec 2007 05:42:24 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Eric W. Biederman's message of "Wed, 12 Dec 2007 05:40:54 -0700") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Andrew Morton Cc: Linux Containers , Oleg Nesterov , Pavel Emelyanov List-Id: containers.vger.kernel.org Currently we have a few instances where we are generating signals setting si_code to SI_USER and si_pid to the task id. However in the case of SI_USER we are using a posix defined interface, and posix defines si_pid as the sending process id. Which in linux is equivalent to the task group id. So fix SI_USER to fill in the proper si_pid value. Signed-off-by: Eric W. Biederman --- kernel/signal.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index 280bccb..694a643 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -694,7 +694,7 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t, q->info.si_signo = sig; q->info.si_errno = 0; q->info.si_code = SI_USER; - q->info.si_pid = task_pid_vnr(current); + q->info.si_pid = task_tgid_vnr(current); q->info.si_uid = current->uid; break; case (unsigned long) SEND_SIG_PRIV: @@ -1794,7 +1794,7 @@ relock: info->si_signo = signr; info->si_errno = 0; info->si_code = SI_USER; - info->si_pid = task_pid_vnr(current->parent); + info->si_pid = task_tgid_vnr(current->parent); info->si_uid = current->parent->uid; } -- 1.5.3.rc6.17.g1911