From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: [PATCH][NETNS] release net when pneigh_lookup fails Date: Tue, 30 Oct 2007 14:06:03 +0100 Message-ID: <47272C3B.5080601@fr.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: 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: Containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org List-Id: containers.vger.kernel.org When the neighbour table constructor fails, the network namespace is not released. This patch fix that. Signed-off-by: Daniel Lezcano --- net/core/neighbour.c | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6-netns/net/core/neighbour.c =================================================================== --- linux-2.6-netns.orig/net/core/neighbour.c +++ linux-2.6-netns/net/core/neighbour.c @@ -497,6 +497,7 @@ struct pneigh_entry * pneigh_lookup(stru if (tbl->pconstructor && tbl->pconstructor(n)) { if (dev) dev_put(dev); + release_net(n->net); kfree(n); n = NULL; goto out;