Commit ab5e5c06 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nf_tables: use kfree_rcu(ptr, rcu) to release hooks in clean_net path

Use kfree_rcu(ptr, rcu) variant instead as described by ae089831
("netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant").

Fixes: f9a43007 ("netfilter: nf_tables: double hook unregistration in netns path")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 282e5f8f
...@@ -7332,7 +7332,7 @@ static void __nft_unregister_flowtable_net_hooks(struct net *net, ...@@ -7332,7 +7332,7 @@ static void __nft_unregister_flowtable_net_hooks(struct net *net,
nf_unregister_net_hook(net, &hook->ops); nf_unregister_net_hook(net, &hook->ops);
if (release_netdev) { if (release_netdev) {
list_del(&hook->list); list_del(&hook->list);
kfree_rcu(hook); kfree_rcu(hook, rcu);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment