Skip to content

Commit f678a58

Browse files
committed
netfilter: nf_tables: use correct lock to protect gc_list
JIRA: https://issues.redhat.com/browse/RHEL-1720 JIRA: https://issues.redhat.com/browse/RHEL-1721 Upstream Status: commit 8357bc9 commit 8357bc9 Author: Pablo Neira Ayuso <pablo@netfilter.org> Date: Mon Aug 21 14:33:32 2023 +0200 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> Signed-off-by: Florian Westphal <fwestpha@redhat.com>
1 parent 4afe09a commit f678a58

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
@@ -9121,9 +9121,9 @@ static void nft_trans_gc_work(struct work_struct *work)
91219121
struct nft_trans_gc *trans, *next;
91229122
LIST_HEAD(trans_gc_list);
91239123

9124-
spin_lock(&nf_tables_destroy_list_lock);
9124+
spin_lock(&nf_tables_gc_list_lock);
91259125
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
9126-
spin_unlock(&nf_tables_destroy_list_lock);
9126+
spin_unlock(&nf_tables_gc_list_lock);
91279127

91289128
list_for_each_entry_safe(trans, next, &trans_gc_list, list) {
91299129
list_del(&trans->list);

0 commit comments

Comments
 (0)