]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 23 Feb 2022 08:22:46 +0000 (09:22 +0100)
commitfa7c3f3232cfa80e7b4a4050db32fdceb2f7d594
tree84f054ce8e22d7fa5056133ef7cb625883d7ce2b
parent9adde65717a3feafa610f2dd82329c65dd09fc75
netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant

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: 4344921cea3b ("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>
net/netfilter/nf_tables_api.c