Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753187AbYH0SIG (ORCPT ); Wed, 27 Aug 2008 14:08:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751561AbYH0SHz (ORCPT ); Wed, 27 Aug 2008 14:07:55 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:45934 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbYH0SHy (ORCPT ); Wed, 27 Aug 2008 14:07:54 -0400 Date: Wed, 27 Aug 2008 11:04:30 -0700 From: sukadev@us.ibm.com To: Oleg Nesterov Cc: Andrew Morton , "Eric W. Biederman" , Pavel Emelyanov , Robert Rex , Roland McGrath , Serge Hallyn , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] pid_ns: (BUG 11391) change ->child_reaper when init->group_leader exits Message-ID: <20080827180430.GA4397@us.ibm.com> References: <20080824154912.GA3780@tv-sign.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080824154912.GA3780@tv-sign.ru> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1225 Lines: 27 Oleg Nesterov [oleg@tv-sign.ru] wrote: | We don't change pid_ns->child_reaper when the main thread of the | subnamespace init exits. As Robert Rex | pointed out this is wrong. | | Yes, the re-parenting itself works correctly, but if the reparented | task exits it needs ->parent->nsproxy->pid_ns in do_notify_parent(), | and if the main thread is zombie its ->nsproxy was already cleared | by exit_task_namespaces(). | | Introduce the new function, find_new_reaper(), which finds the new | ->parent for the re-parenting and changes ->child_reaper if needed. | Kill the now unneeded exit_child_reaper(). | | Also move the changing of ->child_reaper from zap_pid_ns_processes() | to find_new_reaper(), this consolidates the games with ->child_reaper | and makes it stable under tasklist_lock. | | Reported-by: Robert Rex | Signed-off-by: Oleg Nesterov Acked-by: Sukadev Bhattiprolu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/