From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Florian Westphal <fw@strlen.de>,
Stefano Brivio <sbrivio@redhat.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 2/8] netfilter: nft_set_pipapo: move prove_locking helper around
Date: Thu, 23 Jul 2026 10:34:27 -0400 [thread overview]
Message-ID: <20260723143433.3226555-2-sashal@kernel.org> (raw)
In-Reply-To: <20260723143433.3226555-1-sashal@kernel.org>
From: Florian Westphal <fw@strlen.de>
[ Upstream commit a590f4760922acaa2d2b55a88004a38eecdd6412 ]
Preparation patch, the helper will soon get called from insert
function too.
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Stable-dep-of: 47e65eff5069 ("netfilter: nft_set_pipapo: don't leak bad clone into future transaction")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/netfilter/nft_set_pipapo.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c
index 6a14d0441c6ef0..502193505bb26d 100644
--- a/net/netfilter/nft_set_pipapo.c
+++ b/net/netfilter/nft_set_pipapo.c
@@ -1217,6 +1217,17 @@ static int pipapo_realloc_scratch(struct nft_pipapo_match *clone,
return 0;
}
+static bool nft_pipapo_transaction_mutex_held(const struct nft_set *set)
+{
+#ifdef CONFIG_PROVE_LOCKING
+ const struct net *net = read_pnet(&set->net);
+
+ return lockdep_is_held(&nft_pernet(net)->commit_mutex);
+#else
+ return true;
+#endif
+}
+
/**
* nft_pipapo_insert() - Validate and insert ranged elements
* @net: Network namespace
@@ -1803,17 +1814,6 @@ static void nft_pipapo_commit(struct nft_set *set)
pipapo_gc_queue(set);
}
-static bool nft_pipapo_transaction_mutex_held(const struct nft_set *set)
-{
-#ifdef CONFIG_PROVE_LOCKING
- const struct net *net = read_pnet(&set->net);
-
- return lockdep_is_held(&nft_pernet(net)->commit_mutex);
-#else
- return true;
-#endif
-}
-
static void nft_pipapo_abort(const struct nft_set *set)
{
struct nft_pipapo *priv = nft_set_priv(set);
--
2.53.0
next prev parent reply other threads:[~2026-07-23 14:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 12:34 FAILED: patch "[PATCH] netfilter: nft_set_pipapo: don't leak bad clone into future" failed to apply to 6.1-stable tree gregkh
2026-07-23 14:34 ` [PATCH 6.1.y 1/8] netfilter: nft_set_pipapo: use GFP_KERNEL for insertions Sasha Levin
2026-07-23 14:34 ` Sasha Levin [this message]
2026-07-23 14:34 ` [PATCH 6.1.y 3/8] netfilter: nft_set_pipapo: make pipapo_clone helper return NULL Sasha Levin
2026-07-23 14:34 ` [PATCH 6.1.y 4/8] netfilter: nft_set_pipapo: prepare walk function for on-demand clone Sasha Levin
2026-07-23 14:34 ` [PATCH 6.1.y 5/8] netfilter: nft_set_pipapo: merge deactivate helper into caller Sasha Levin
2026-07-23 14:34 ` [PATCH 6.1.y 6/8] netfilter: nft_set_pipapo: prepare pipapo_get helper for on-demand clone Sasha Levin
2026-07-23 14:34 ` [PATCH 6.1.y 7/8] netfilter: nft_set_pipapo: move cloning of match info to insert/removal path Sasha Levin
2026-07-23 14:34 ` [PATCH 6.1.y 8/8] netfilter: nft_set_pipapo: don't leak bad clone into future transaction Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723143433.3226555-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=fw@strlen.de \
--cc=pablo@netfilter.org \
--cc=sbrivio@redhat.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.