Skip to content

Commit 7315dc1

Browse files
committed
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>
1 parent 0ae8e4c commit 7315dc1

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
@@ -9887,7 +9887,7 @@ static void nft_set_commit_update(struct list_head *set_update_list)
98879887
list_for_each_entry_safe(set, next, set_update_list, pending_update) {
98889888
list_del_init(&set->pending_update);
98899889

9890-
if (!set->ops->commit)
9890+
if (!set->ops->commit || set->dead)
98919891
continue;
98929892

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

0 commit comments

Comments
 (0)