mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
netfilter: nf_tables: skip set commit for deleted/destroyed sets
commit 7315dc1e122c85ffdfc8defffbb8f8b616c2eb1a upstream.
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: 5f68718b34 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4768430d5a
commit
0105571f80
@@ -9480,7 +9480,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_for_each_entry_safe(set, next, set_update_list, pending_update) {
|
||||||
list_del_init(&set->pending_update);
|
list_del_init(&set->pending_update);
|
||||||
|
|
||||||
if (!set->ops->commit)
|
if (!set->ops->commit || set->dead)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
set->ops->commit(set);
|
set->ops->commit(set);
|
||||||
|
|||||||
Reference in New Issue
Block a user