netfilter: nf_tables: skip set commit for deleted/destroyed sets
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 19 Dec 2023 18:44:49 +0000 (19:44 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Sun, 31 Dec 2023 15:46:35 +0000 (16:46 +0100)
commitc4174bc4438b2b015ba938a7b6cd77d95f1e90aa
treeb1533033c751d4b63ceb26577066a8dcf7d5ad84
parent32429f39bfa24b4c662e489ea6ce145b59016fd8
netfilter: nf_tables: skip set commit for deleted/destroyed sets

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git/commit/?id=7315dc1e122c85ffdfc8defffbb8f8b616c2eb1a

NFT_MSG_DELSET deactivates all elements in the set, skip
set->ops->commit() to avoid the unnecessary clone (for the pipapo case)
as well as the sync GC cycle, which could deactivate again expired
elements in such set.

Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Reported-by: Kevin Rich <kevinrich1337@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nf_tables-skip-set-commit-for-deleted-dest.patch
net/netfilter/nf_tables_api.c