[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0799ed9-dd85-e4ce-e06a-9b97b4047a86@virtuozzo.com>
Date: Mon, 6 Nov 2017 16:25:25 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: netdev@...r.kernel.org
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
Florian Westphal <fw@...len.de>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org
Subject: [PATCH v3 16/21] nfnetlink_log: exit_net cleanup check added
Be sure that instance_table array initialized in net_init hook
was return to initial state.
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
net/netfilter/nfnetlink_log.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index cad6498..85bc47a 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -1093,10 +1093,17 @@ static int __net_init nfnl_log_net_init(struct net *net)
static void __net_exit nfnl_log_net_exit(struct net *net)
{
+ unsigned int i;
+ struct nfnl_log_net *log = nfnl_log_pernet(net);
#ifdef CONFIG_PROC_FS
remove_proc_entry("nfnetlink_log", net->nf.proc_netfilter);
#endif
nf_log_unset(net, &nfulnl_logger);
+ for (i = 0; i < INSTANCE_BUCKETS; i++)
+ if (WARN_ONCE(!hlist_empty(&log->instance_table[i]),
+ "net %x %s: instance_table is not empty\n",
+ net->ns.inum, __func__))
+ break;
}
static struct pernet_operations nfnl_log_net_ops = {
--
2.7.4
Powered by blists - more mailing lists