]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nf_tables: use kfree_rcu(ptr, rcu) to release hooks in clean_net path
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 1 Jun 2022 14:00:00 +0000 (16:00 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 1 Jun 2022 14:01:54 +0000 (16:01 +0200)
Use kfree_rcu(ptr, rcu) variant instead as described by ae089831ff28
("netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant").

Fixes: f9a43007d3f7 ("netfilter: nf_tables: double hook unregistration in netns path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index 746be13438eff579cb2d057064f19b643cbbe641..129d3ebd6ce5d42ca6935aa8545c5c8a176c4dd8 100644 (file)
@@ -7332,7 +7332,7 @@ static void __nft_unregister_flowtable_net_hooks(struct net *net,
                nf_unregister_net_hook(net, &hook->ops);
                if (release_netdev) {
                        list_del(&hook->list);
-                       kfree_rcu(hook);
+                       kfree_rcu(hook, rcu);
                }
        }
 }