Skip to content

Commit 41e58a5

Browse files
committed
netfilter: nf_tables: use correct lock to protect gc_list
jira VUlN-597 subsystem-sync netfilter:nf_tables 4.18.0-534 commit-author Pablo Neira Ayuso <pablo@netfilter.org> 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 <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de> (cherry picked from commit 8357bc9) Signed-off-by: Greg Rose <g.v.rose@ciq.com>
1 parent 90f166c commit 41e58a5

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
@@ -7878,9 +7878,9 @@ static void nft_trans_gc_work(struct work_struct *work)
78787878
struct nft_trans_gc *trans, *next;
78797879
LIST_HEAD(trans_gc_list);
78807880

7881-
spin_lock(&nf_tables_destroy_list_lock);
7881+
spin_lock(&nf_tables_gc_list_lock);
78827882
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
7883-
spin_unlock(&nf_tables_destroy_list_lock);
7883+
spin_unlock(&nf_tables_gc_list_lock);
78847884

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

0 commit comments

Comments
 (0)