From: Sasha Levin Date: Fri, 22 Sep 2023 16:30:27 +0000 (+0200) Subject: netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails X-Git-Tag: archive/raspbian/6.1.55-1+rpi1^2~52 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=90cd15ab5571177fee775b11f1ee4f93c1346040;p=linux.git netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails commit 6d365eabce3c018a80f6e0379b17df2abb17405e upstream. nft_trans_gc_queue_sync() enqueues the GC transaction and it allocates a new one. If this allocation fails, then stop this GC sync run and retry later. Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin Gbp-Pq: Topic bugfix/all Gbp-Pq: Name netfilter-nft_set_pipapo-stop-gc-iteration-if-gc-tra.patch --- diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index 7248a1737ee..83f5f276c3b 100644 --- a/net/netfilter/nft_set_pipapo.c +++ b/net/netfilter/nft_set_pipapo.c @@ -1597,7 +1597,7 @@ static void pipapo_gc(const struct nft_set *_set, struct nft_pipapo_match *m) gc = nft_trans_gc_queue_sync(gc, GFP_ATOMIC); if (!gc) - break; + return; nft_pipapo_gc_deactivate(net, set, e); pipapo_drop(m, rulemap);