[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0d49d64-d46b-21e6-02e4-4c445600bd39@virtuozzo.com>
Date: Sun, 12 Nov 2017 11:47:01 +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 v4 12/18] nfnetlink_gueue: 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_queue.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index c979662..fd41077 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -1512,10 +1512,16 @@ static int __net_init nfnl_queue_net_init(struct net *net)
static void __net_exit nfnl_queue_net_exit(struct net *net)
{
+ unsigned int i;
+ struct nfnl_queue_net *q = nfnl_queue_pernet(net);
+
nf_unregister_queue_handler(net);
#ifdef CONFIG_PROC_FS
remove_proc_entry("nfnetlink_queue", net->nf.proc_netfilter);
#endif
+ for (i = 0; i < INSTANCE_BUCKETS; i++)
+ if (WARN_ON_ONCE(!hlist_empty(&q->instance_table[i])))
+ break;
}
static void nfnl_queue_net_exit_batch(struct list_head *net_exit_list)
--
2.7.4
Powered by blists - more mailing lists