netfilter: iptables: Split ipt_unregister_table() into pre_exit and exit helpers.
authorDavid Wilder <dwilder@us.ibm.com>
Mon, 22 Jun 2020 17:10:11 +0000 (10:10 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Jun 2020 22:50:31 +0000 (00:50 +0200)
commit1cbf90985f7448f1b0dd630e17ee1070f7d58665
tree8d473cea2adc595d306a104ff64db2d53cdb3881
parent4cacc39516784670aa09833a9ec8bf3e90bef561
netfilter: iptables: Split ipt_unregister_table() into pre_exit and exit helpers.

The pre_exit will un-register the underlying hook and .exit will do the
table freeing. The netns core does an unconditional synchronize_rcu after
the pre_exit hooks insuring no packets are in flight that have picked up
the pointer before completing the un-register.

Fixes: b9e69e127397 ("netfilter: xtables: don't hook tables by default")
Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter_ipv4/ip_tables.h
net/ipv4/netfilter/ip_tables.c