net: Convert broute_net_ops, frame_filter_net_ops and frame_nat_net_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 5 Mar 2018 11:30:41 +0000 (14:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Mar 2018 15:48:27 +0000 (10:48 -0500)
These pernet_operations use ebt_register_table() and
ebt_unregister_table() to act on the tables, which
are used as argument in ebt_do_table(), called from
ebtables hooks.

Since there are no net-related bridge packets in-flight,
when the init and exit methods are called, these
pernet_operations are safe to be executed in parallel
with any other.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebtable_broute.c
net/bridge/netfilter/ebtable_filter.c
net/bridge/netfilter/ebtable_nat.c

index 276b60262981c95a9fccd508e8d8123212d535de..f070b5e5b9dd37f78877457e9355ae5eaf3871bd 100644 (file)
@@ -77,6 +77,7 @@ static void __net_exit broute_net_exit(struct net *net)
 static struct pernet_operations broute_net_ops = {
        .init = broute_net_init,
        .exit = broute_net_exit,
+       .async = true,
 };
 
 static int __init ebtable_broute_init(void)
index c41da5fac84f49a9cf5e58eaab88b3beb2d81fba..4151afc8efcc1f1cc41d9ea947d46e88670a6f63 100644 (file)
@@ -105,6 +105,7 @@ static void __net_exit frame_filter_net_exit(struct net *net)
 static struct pernet_operations frame_filter_net_ops = {
        .init = frame_filter_net_init,
        .exit = frame_filter_net_exit,
+       .async = true,
 };
 
 static int __init ebtable_filter_init(void)
index 08df7406ecb3835a664a695a239d73f62eeaf457..b8da2dfe2ec50f61c2587eb74763291eb227c6d1 100644 (file)
@@ -105,6 +105,7 @@ static void __net_exit frame_nat_net_exit(struct net *net)
 static struct pernet_operations frame_nat_net_ops = {
        .init = frame_nat_net_init,
        .exit = frame_nat_net_exit,
+       .async = true,
 };
 
 static int __init ebtable_nat_init(void)