[PATCH 18/21] recent: exit_net cleanup check added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Be sure that tables list initialized in net_init hook was return
to initial state.

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

diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
index 245fa35..7e29d30 100644
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -681,7 +681,11 @@ static int __net_init recent_net_init(struct net *net)
 
 static void __net_exit recent_net_exit(struct net *net)
 {
+	struct recent_net *recent_net = recent_pernet(net);
+
 	recent_proc_net_exit(net);
+	WARN(!list_empty(&recent_net->tables),
+	     "net %p exit: recent tables list is not empty\n", net);
 }
 
 static struct pernet_operations recent_net_ops = {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux