netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 6 Sep 2023 15:22:58 +0000 (17:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 8 Sep 2023 01:26:58 +0000 (03:26 +0200)
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 <pablo@netfilter.org>
net/netfilter/nft_set_pipapo.c

index 10b89ac74476b057ee38a7eeba84b33ec1473a34..c0dcc40de358fb2f364ed15f05a5b166279887aa 100644 (file)
@@ -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);