mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
netfilter: nf_tables: use correct lock to protect gc_list
commit8357bc946a
upstream. Use nf_tables_gc_list_lock spinlock, not nf_tables_destroy_list_lock to protect the gc_list. Fixes:5f68718b34
("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b44a459c65
commit
082791b421
1 changed files with 2 additions and 2 deletions
|
@ -8925,9 +8925,9 @@ static void nft_trans_gc_work(struct work_struct *work)
|
||||||
struct nft_trans_gc *trans, *next;
|
struct nft_trans_gc *trans, *next;
|
||||||
LIST_HEAD(trans_gc_list);
|
LIST_HEAD(trans_gc_list);
|
||||||
|
|
||||||
spin_lock(&nf_tables_destroy_list_lock);
|
spin_lock(&nf_tables_gc_list_lock);
|
||||||
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
|
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
|
||||||
spin_unlock(&nf_tables_destroy_list_lock);
|
spin_unlock(&nf_tables_gc_list_lock);
|
||||||
|
|
||||||
list_for_each_entry_safe(trans, next, &trans_gc_list, list) {
|
list_for_each_entry_safe(trans, next, &trans_gc_list, list) {
|
||||||
list_del(&trans->list);
|
list_del(&trans->list);
|
||||||
|
|
Loading…
Reference in a new issue