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 ae089831ff
("netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant").

Fixes: f9a43007d3 ("netfilter: nf_tables: double hook unregistration in netns path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Pablo Neira Ayuso 2022-06-01 16:00:00 +02:00
parent 282e5f8fe9
commit ab5e5c062f
1 changed files with 1 additions and 1 deletions

View 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);
}
}
}