From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63937E7C4E8 for ; Wed, 4 Oct 2023 18:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243977AbjJDSM7 (ORCPT ); Wed, 4 Oct 2023 14:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243949AbjJDSM6 (ORCPT ); Wed, 4 Oct 2023 14:12:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0843BAD for ; Wed, 4 Oct 2023 11:12:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C4F5C433C8; Wed, 4 Oct 2023 18:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696443174; bh=VARRHrheSgAk7Z34Eg1UUyQsnG2a/QfCeQgjuE99Mtg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZanhV63WzovP2OOIYhetU1SRurPyWLjvTOtC1QMCEjmXp6tm03xZJYDKDGJgvPTQZ cwxtFnBFdhCcT2Ew/H+ALqTxV5+A3Db/vdxpXK++91W2G54oYcMFZz7vel6EnV7WH1 J7hEPPo8LXQHAKsQ4ruMED/f5Qp3yB1qmxMBMVtU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.1 034/259] netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails Date: Wed, 4 Oct 2023 19:53:27 +0200 Message-ID: <20231004175219.004954576@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231004175217.404851126@linuxfoundation.org> References: <20231004175217.404851126@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pablo Neira Ayuso 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 --- net/netfilter/nft_set_pipapo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index 7248a1737ee14..83f5f276c3bff 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); -- 2.40.1