Thread (83 messages) flat view 83 messages, 9 authors, 2017-11-14
STALE3200d

[PATCH v2 17/21] hashlimit: exit_net cleanup check added

From: Vasily Averin <hidden>
Date: 2017-11-05 16:51:38
Also in: netfilter-devel
Subsystem: netfilter, networking [general], the rest · Maintainers: Pablo Neira Ayuso, Florian Westphal, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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

Signed-off-by: Vasily Averin <redacted>
---
 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..abef6b4 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),
+	     "%s: htables hlist is not empty\n", __func__);
 }
 
 static struct pernet_operations hashlimit_net_ops = {
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help