netfilter: nf_tables: skip set commit for deleted/destroyed sets
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 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.
Reported-by Kevin Rich <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
@@ -9887,7 +9887,7 @@ static void nft_set_commit_update(struct list_head *set_update_list)list_for_each_entry_safe (set, next, set_update_list, pending_update) {list_del_init (&set->pending_update); -if (!set->ops->commit) +if (!set->ops->commit || set->dead)continue ; set->ops->commit (set);
Signature · 1 line
2.30.2