From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gao feng Subject: Re: [PATCH 06/11] pidns: Don't allow new processes in a dead pid namespace. Date: Wed, 21 Nov 2012 10:17:11 +0800 Message-ID: <50AC39A7.2010505@cn.fujitsu.com> References: <8739097bkk.fsf@xmission.com> <1353083750-3621-1-git-send-email-ebiederm@xmission.com> <1353083750-3621-6-git-send-email-ebiederm@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1353083750-3621-6-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@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: "Eric W. Biederman" Cc: Linux Containers , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Oleg Nesterov List-Id: containers.vger.kernel.org on 2012/11/17 00:35, Eric W. Biederman wrote: > From: "Eric W. Biederman" > > Set nr_hashed to -1 just before we schedule the work to cleanup proc. > Test nr_hashed just before we hash a new pid and if nr_hashed is < 0 > fail. > > This guaranteees that processes never enter a pid namespaces after we > have cleaned up the state to support processes in a pid namespace. > > Currently sending SIGKILL to all of the process in a pid namespace as > init exists gives us this guarantee but we need something a little > stronger to support unsharing and joining a pid namespace. > > Acked-by: "Serge E. Hallyn" > Signed-off-by: Eric W. Biederman > --- Acked-by: Gao feng