From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [PATCH 1/15] Move exit_task_namespaces() Date: Mon, 06 Aug 2007 12:00:44 +0400 Message-ID: <46B6D52C.3010405@openvz.org> References: <46A8B37B.6050108@openvz.org> <46A8B3C4.5080601@openvz.org> <20070802162023.GB137@tv-sign.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070802162023.GB137-6lXkIZvqkOAvJsYlp49lxw@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: Oleg Nesterov Cc: Linux Containers List-Id: containers.vger.kernel.org Oleg Nesterov wrote: > On 07/26, Pavel Emelyanov wrote: >> The reason to release namespaces after reparenting is that when task >> exits it may send a signal to its parent (SIGCHLD), but if the parent >> has already exited its namespaces there will be no way to decide what >> pid to dever to him - parent can be from different namespace. > > I almost forgot about this one... > > After reading the whole series, I can't understand the above explanation > any longer. The parent can't be from different namespace, either we have > another sub-thread, or we reparent the child to /sbin/init which should > be from the same namespace. If the child that is a new namespace's init is exiting its parent is from the different namespace. Moreover, we will probably want to implement "entering" the pid namespace, so having tasks with parents from another namespace will be OK. > If we are /sbin/init, we kill all tasks from the same namespace before > doing exit_notify(). > > Could you clarify? > > Oleg. > >