From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 9/9] signal: Ignore signals sent to the pid namespace init Date: Thu, 13 Dec 2007 19:28:11 +0300 Message-ID: <20071213162811.GC219@tv-sign.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: 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: "Eric W. Biederman" Cc: Linux Containers , Andrew Morton , Pavel Emelyanov List-Id: containers.vger.kernel.org On 12/12, Eric W. Biederman wrote: > > -static int is_sig_init(struct task_struct *tsk) > +static int is_sig_init(struct task_struct *init, struct pid *sender) > { > - if (likely(!is_global_init(tsk->group_leader))) > + if (!is_container_init(init)) > + return 0; > + > + if (!sender) > + sender = task_tgid(current); What if this signal is sent from the interrupt and sender == NULL? > + > + if (!pid_in_pid_ns(sender, task_active_pid_ns(init))) > return 0; In that case the result of the above check can be wrong, no? Oleg.