From: Pablo Neira Ayuso Date: Wed, 6 Sep 2023 15:22:58 +0000 (+0200) Subject: netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails X-Git-Tag: v6.6.7~1864^2~25^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d365eabce3c018a80f6e0379b17df2abb17405e;p=platform%2Fkernel%2Flinux-starfive.git netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails 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 --- diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index 10b89ac..c0dcc40d 100644 --- a/net/netfilter/nft_set_pipapo.c +++ b/net/netfilter/nft_set_pipapo.c @@ -1596,7 +1596,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);