diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-05-15 21:58:36 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-05-15 21:58:36 +0000 |
commit | cc487c1697b554779d270e599cad6392e4c697b9 (patch) | |
tree | 8f03593d40d2e206d1ee2e13711d6963b85807de /sys/netinet/ip_divert.c | |
parent | c48eb1f427388b776e1b3208cc9975e5157e37cf (diff) | |
download | src-cc487c1697b554779d270e599cad6392e4c697b9.tar.gz src-cc487c1697b554779d270e599cad6392e4c697b9.zip |
Reduce in_pcbinfo_init() by two params. No users supply any flags to this
function (they used to say UMA_ZONE_NOFREE), so flag parameter goes away.
The zone_fini parameter also goes away. Previously no protocols (except
divert) supplied zone_fini function, so inpcb locks were leaked with slabs.
This was okay while zones were allocated with UMA_ZONE_NOFREE flag, but now
this is a leak. Fix that by suppling inpcb_fini() function as fini method
for all inpcb zones.
Notes
Notes:
svn path=/head/; revision=318321
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index be0bbf7f5648..8c1960d14eef 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -141,14 +141,6 @@ div_inpcb_init(void *mem, int size, int flags) } static void -div_inpcb_fini(void *mem, int size) -{ - struct inpcb *inp = mem; - - INP_LOCK_DESTROY(inp); -} - -static void div_init(void) { @@ -158,7 +150,7 @@ div_init(void) * place for hashbase == NULL. */ in_pcbinfo_init(&V_divcbinfo, "div", &V_divcb, 1, 1, "divcb", - div_inpcb_init, div_inpcb_fini, 0, IPI_HASHFIELDS_NONE); + div_inpcb_init, IPI_HASHFIELDS_NONE); } static void |