Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2013 20:33:33 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258591 - head/sys/net
Message-ID:  <201311252033.rAPKXXww025252@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Mon Nov 25 20:33:33 2013
New Revision: 258591
URL: http://svnweb.freebsd.org/changeset/base/258591

Log:
  In vnet_route_uninit(), free some memory that is allocated in vnet_route_init().
  
  To reproduce the problem:
    (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
         INVARIANTS.
    (2)  Run this command in a loop:
         jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo
  
         see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html
              http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html
  
  This doesn't eliminate all the "Freed UMA keg was not empty" warning messages
  on the console, but it helps.

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Mon Nov 25 20:29:26 2013	(r258590)
+++ head/sys/net/route.c	Mon Nov 25 20:33:33 2013	(r258591)
@@ -255,6 +255,9 @@ vnet_route_uninit(const void *unused __u
 			dom->dom_rtdetach((void **)rnh, dom->dom_rtoffset);
 		}
 	}
+
+	free(V_rt_tables, M_RTABLE);
+	uma_zdestroy(V_rtzone);
 }
 VNET_SYSUNINIT(vnet_route_uninit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD,
     vnet_route_uninit, 0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311252033.rAPKXXww025252>