From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Denis V. Lunev" Subject: Re: [patch 1/3][NETNS45][V2] add a reference to the netns for timewait Date: Thu, 27 Sep 2007 16:34:51 +0400 Message-ID: <46FBA36B.3020101@sw.ru> References: <20070927110400.409277229@mai.toulouse-stg.fr.ibm.com> <20070927111208.092780734@mai.toulouse-stg.fr.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070927111208.092780734-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@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: Daniel Lezcano Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org List-Id: containers.vger.kernel.org Daniel Lezcano wrote: > From: Daniel Lezcano > > When a socket changes to a timewait socket, the network namespace > is not copied from the original socket. > > Here we hold a usage reference, not the ref count on the network > namespace, so the network namespace will be freed either the usage > reference is not 0. The network namespace cleanup function will > fail if there is any usage of it. In this case, we should ensure > there is no usage of the network namespace. > > Signed-off-by: Daniel Lezcano Acked-by: Denis V. Lunev