All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 17/21] hashlimit: exit_net cleanup check added
@ 2017-11-05 10:02 Vasily Averin
  0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2017-11-05 10:02 UTC (permalink / raw)
  To: netdev
  Cc: coreteam, netfilter-devel, Florian Westphal, Jozsef Kadlecsik,
	Pablo Neira Ayuso

Be sure that htables array initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 net/netfilter/xt_hashlimit.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 5da8746..78485d1 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -1338,7 +1338,11 @@ static int __net_init hashlimit_net_init(struct net *net)
 
 static void __net_exit hashlimit_net_exit(struct net *net)
 {
+	struct hashlimit_net *hashlimit_net = hashlimit_pernet(net);
+
 	hashlimit_proc_net_exit(net);
+	WARN(!hlist_empty(&hashlimit_net->htables),
+	     "net %p exit: hashlimit htables hlist is not empty\n", net);
 }
 
 static struct pernet_operations hashlimit_net_ops = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-05 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 10:02 [PATCH 17/21] hashlimit: exit_net cleanup check added Vasily Averin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.