Skip to content

Commit 80a00ed

Browse files
committed
netfilter: nf_tables: use correct lock to protect gc_list
jira VUlN-597 subsystem-sync netfilter:nf_tables 4.18.0-511 commit-author Pablo Neira Ayuso <[email protected]> commit 8357bc9 Use nf_tables_gc_list_lock spinlock, not nf_tables_destroy_list_lock to protect the gc list. Fixes: 5f68718 ("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Florian Westphal <[email protected]> (cherry picked from commit 8357bc9) Signed-off-by: Greg Rose <[email protected]>
1 parent cbc7233 commit 80a00ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7879,9 +7879,9 @@ static void nft_trans_gc_work(struct work_struct *work)
78797879
struct nft_trans_gc *trans, *next;
78807880
LIST_HEAD(trans_gc_list);
78817881

7882-
spin_lock(&nf_tables_destroy_list_lock);
7882+
spin_lock(&nf_tables_gc_list_lock);
78837883
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
7884-
spin_unlock(&nf_tables_destroy_list_lock);
7884+
spin_unlock(&nf_tables_gc_list_lock);
78857885

78867886
list_for_each_entry_safe(trans, next, &trans_gc_list, list) {
78877887
list_del(&trans->list);

0 commit comments

Comments
 (0)