Skip to content

Commit d51e691

Browse files
committed
netfilter: nf_tables: skip set commit for deleted/destroyed sets
JIRA: https://issues.redhat.com/browse/RHEL-21443 Upstream Status: commit 7315dc1 commit 7315dc1 Author: Pablo Neira Ayuso <pablo@netfilter.org> Date: Tue Dec 19 19:44:49 2023 +0100 netfilter: nf_tables: skip set commit for deleted/destroyed sets 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: 5f68718 ("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> Signed-off-by: Florian Westphal <fwestpha@redhat.com>
1 parent 808dde1 commit d51e691

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9579,7 +9579,7 @@ static void nft_set_commit_update(struct list_head *set_update_list)
95799579
list_for_each_entry_safe(set, next, set_update_list, pending_update) {
95809580
list_del_init(&set->pending_update);
95819581

9582-
if (!set->ops->commit)
9582+
if (!set->ops->commit || set->dead)
95839583
continue;
95849584

95859585
set->ops->commit(set);

0 commit comments

Comments
 (0)