From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 5/7][v8] zap_pid_ns_process() should use force_sig() Date: Thu, 19 Feb 2009 19:59:54 +0100 Message-ID: <20090219185954.GB374@redhat.com> References: <20090219030207.GA18783@us.ibm.com> <20090219030704.GE18990@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20090219030704.GE18990-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 Bhattiprolu Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Eric W. Biederman" , Containers , roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: containers.vger.kernel.org On 02/18, Sukadev Bhattiprolu wrote: > > read_lock(&tasklist_lock); > nr = next_pidmap(pid_ns, 1); > while (nr > 0) { > - kill_proc_info(SIGKILL, SEND_SIG_PRIV, nr); > + rcu_read_lock(); > + > + /* > + * Use force_sig() since it clears SIGNAL_UNKILLABLE ensuring > + * any nested-container's init processes don't ignore the > + * signal > + */ > + task = pid_task(find_vpid(nr), PIDTYPE_PID); > + force_sig(SIGKILL, task); Shouldn't we check task != NULL ? Oleg.