summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-03-06 21:24:32 +0000
committerbz <bz@FreeBSD.org>2010-03-06 21:24:32 +0000
commitf82acabd2e2f46059cb8f8892210335c0444c48d (patch)
tree639ebba236d469c2495843d7fcdf3645993cacfb /sys/netinet
parent72ccf684117a9c31eec566ffb3d7466488a8c2e6 (diff)
downloadFreeBSD-src-f82acabd2e2f46059cb8f8892210335c0444c48d.zip
FreeBSD-src-f82acabd2e2f46059cb8f8892210335c0444c48d.tar.gz
Destroy UDP UMA zones (empty or not) upon network stack teardown
to not leak them making the VM subsystem unhappy with every stoped vnet(*). We will still leak pages (especially as zones are marked NOFREE). (*) This will also keep vmstat -z more usable. Sponsored by: ISPsystem MFC after: 5 days
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/udp_usrreq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 019ceb3..b5846c3 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -245,6 +245,9 @@ udp_destroy(void)
V_udbinfo.ipi_hashmask);
hashdestroy(V_udbinfo.ipi_porthashbase, M_PCB,
V_udbinfo.ipi_porthashmask);
+
+ uma_zdestroy(V_udpcb_zone);
+ uma_zdestroy(V_udbinfo.ipi_zone);
INP_INFO_LOCK_DESTROY(&V_udbinfo);
}
#endif
OpenPOWER on IntegriCloud