netfilter: nf_tables: split async and sync catchall in two functions
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 13 Nov 2023 20:13:31 +0000 (21:13 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Nov 2023 15:16:21 +0000 (16:16 +0100)
commit8837ba3e58ea1e3d09ae36db80b1e80853aada95
tree4c981353ff8c75d27b9c74bb8109e93a75ea1e86
parent28628fa952fefc7f2072ce6e8016968cc452b1ba
netfilter: nf_tables: split async and sync catchall in two functions

list_for_each_entry_safe() does not work for the async case which runs
under RCU, therefore, split GC logic for catchall in two functions
instead, one for each of the sync and async GC variants.

The catchall sync GC variant never sees a _DEAD bit set on ever, thus,
this handling is removed in such case, moreover, allocate GC sync batch
via GFP_KERNEL.

Fixes: 93995bf4af2c ("netfilter: nf_tables: remove catchall element in GC sync path")
Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c