netfilter: nf_tables: remove catchall element in GC sync path
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 Nov 2023 12:14:21 +0000 (13:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:20:03 +0000 (17:20 +0000)
commit80d6a9236ab6d2c0fd241514d1af2e325d16a210
tree0516ab17a7dd4a2a04f57996db06ad427265c698
parenta311638793fa0b07ecbca079273288f7b143ab2a
netfilter: nf_tables: remove catchall element in GC sync path

[ Upstream commit 93995bf4af2c5a99e2a87f0cd5ce547d31eb7630 ]

The expired catchall element is not deactivated and removed from GC sync
path. This path holds mutex so just call nft_setelem_data_deactivate()
and nft_setelem_catchall_remove() before queueing the GC work.

Fixes: 4a9e12ea7e70 ("netfilter: nft_set_pipapo: call nft_trans_gc_queue_sync() in catchall GC")
Reported-by: lonial con <kongln9170@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c