Skip to content

Commit 8357bc9

Browse files
ummakynesFlorian Westphal
authored andcommitted
netfilter: nf_tables: use correct lock to protect gc_list
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>
1 parent 7203443 commit 8357bc9

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
@@ -9456,9 +9456,9 @@ static void nft_trans_gc_work(struct work_struct *work)
94569456
struct nft_trans_gc *trans, *next;
94579457
LIST_HEAD(trans_gc_list);
94589458

9459-
spin_lock(&nf_tables_destroy_list_lock);
9459+
spin_lock(&nf_tables_gc_list_lock);
94609460
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
9461-
spin_unlock(&nf_tables_destroy_list_lock);
9461+
spin_unlock(&nf_tables_gc_list_lock);
94629462

94639463
list_for_each_entry_safe(trans, next, &trans_gc_list, list) {
94649464
list_del(&trans->list);

0 commit comments

Comments
 (0)