netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant
authorEric Dumazet <edumazet@google.com>
Tue, 22 Feb 2022 18:13:31 +0000 (10:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:49 +0000 (19:12 +0100)
commit9920d99cc89aeadca9e9b8a7f4e201c24afb35f1
tree7bbdc18115f894ba5dfc92f9c0e0bb2e97337f33
parent4ed52fbeb967f0facd25943479287f5ae260a8a8
netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant

[ Upstream commit ae089831ff28a115908b8d796f667c2dadef1637 ]

While kfree_rcu(ptr) _is_ supported, it has some limitations.

Given that 99.99% of kfree_rcu() users [1] use the legacy
two parameters variant, and @catchall objects do have an rcu head,
simply use it.

Choice of kfree_rcu(ptr) variant was probably not intentional.

[1] including calls from net/netfilter/nf_tables_api.c

Fixes: aaa31047a6d2 ("netfilter: nftables: add catch-all set element support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c