From: Pablo Neira Ayuso Date: Wed, 1 Jun 2022 14:00:00 +0000 (+0200) Subject: netfilter: nf_tables: use kfree_rcu(ptr, rcu) to release hooks in clean_net path X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=73629859a99759c9ce88cdf19b5afbe185d5f4c8;p=linux.git netfilter: nf_tables: use kfree_rcu(ptr, rcu) to release hooks in clean_net path [ Upstream commit ab5e5c062f67c5ae8cd07f0632ffa62dc0e7d169 ] 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 Signed-off-by: Sasha Levin --- diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 79e8fc687fdd4..5833fe17be43d 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -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); } } }