From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 1/3] Signal semantics for /sbin/init Date: Sat, 1 Sep 2007 15:02:21 +0400 Message-ID: <20070901110221.GC191@tv-sign.ru> References: <20070831202949.GA3268@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20070831202949.GA3268-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 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: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org Cc: havblue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org, Containers , Pavel Emelianov List-Id: containers.vger.kernel.org On 08/31, sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org wrote: > > -static int sig_ignored(struct task_struct *t, int sig) > + // Currently this check is a bit racy with exec(), > + // we can _simplify_ de_thread and close the race. > + if (likely(!is_container_init(tsk->group_leader))) > + return 0; > + > + if (!in_interrupt()) > + return 0; I don't understand why you are trying to mix this patch with pid_ns changes. We don't need in_interrupt() check unless we use current do decide if the signal goes from the parent namespace. And in fact, I'd personally prefer to use "is_global_init()" for this patch, because it hopefully can fix the problems we have even without namespaces. This also matches the current check in get_signal_to_deliver(). Oleg.