Skip to content

Commit

Permalink
netfilter: nf_tables: use kfree_rcu(ptr, rcu) to release hooks in cle…
Browse files Browse the repository at this point in the history
…an_net path

[ Upstream commit ab5e5c0 ]

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

Fixes: f9a4300 ("netfilter: nf_tables: double hook unregistration in netns path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ummakynes authored and gregkh committed Jun 14, 2022
1 parent bf65364 commit 7362985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_tables_api.c
Expand Up @@ -7231,7 +7231,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);
}
}
}
Expand Down

0 comments on commit 7362985

Please sign in to comment.