diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2017-11-12 14:32:37 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-11-20 12:03:41 +0100 |
commit | 613d0776d3fe7eb28c695a63a5533a1ec8258c86 (patch) | |
tree | 08d9707ea53ccf351385ada525aeb3f250ccb6fd /net/netfilter/nfnetlink_queue.c | |
parent | 07dc8bc9a6b15f54d3ad962af74a096c7d7b42b4 (diff) | |
download | linux-613d0776d3fe7eb28c695a63a5533a1ec8258c86.tar.gz linux-613d0776d3fe7eb28c695a63a5533a1ec8258c86.tar.bz2 linux-613d0776d3fe7eb28c695a63a5533a1ec8258c86.zip |
netfilter: exit_net cleanup check added
Be sure that lists initialized in net_init hook was return to initial
state.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nfnetlink_queue.c')
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index a16356cacec3..c09b36755ed7 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -1512,10 +1512,15 @@ static int __net_init nfnl_queue_net_init(struct net *net) static void __net_exit nfnl_queue_net_exit(struct net *net) { + struct nfnl_queue_net *q = nfnl_queue_pernet(net); + unsigned int i; + 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++) + WARN_ON_ONCE(!hlist_empty(&q->instance_table[i])); } static void nfnl_queue_net_exit_batch(struct list_head *net_exit_list) |