From: Bradley Morgan <brads@mainlining.org>
To: tristmd@gmail.com
Cc: daniel.m.jordan@oracle.com, herbert@gondor.apana.org.au,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, steffen.klassert@secunet.com,
tristan@talencesecurity.com
Subject: Re: [PATCH] padata: fix lockdep warning in padata_find_next()
Date: Tue, 03 Nov 2026 11:36:24 +0000 [thread overview]
Message-ID: <9BC449D3-C881-406E-87AA-F023C1A864F8@mainlining.org> (raw)
In-Reply-To: <20261102155353.1268322-1-tristan@talencesecurity.com>
On 2 November 2026 15:53:53 GMT, Tristan Madani <tristmd@gmail.com> wrote:
>padata_find_next() acquires reorder->lock while the caller
>padata_reorder() already holds squeue->serial.lock. Both locks are of
>type struct padata_list and thus share the same lockdep class, which
>triggers a false positive recursive locking warning even though the two
>instances always protect different data.
>
>Annotate the inner lock with spin_lock_nested() to tell lockdep about
>the valid nesting.
>
>Fixes: 16295bec6398 ("padata: Generic parallelization/serialization interface")
>Cc: stable@vger.kernel.org
>Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
>---
> kernel/padata.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/kernel/padata.c b/kernel/padata.c
>index 0d3ea1b68b1f7..2f769ba7dfa99 100644
>--- a/kernel/padata.c
>+++ b/kernel/padata.c
>@@ -253,7 +253,7 @@ static struct padata_priv *padata_find_next(struct parallel_data *pd, int cpu,
>
> reorder = per_cpu_ptr(pd->reorder_list, cpu);
>
>- spin_lock(&reorder->lock);
>+ spin_lock_nested(&reorder->lock, SINGLE_DEPTH_NESTING);
I'll bite.
Reviewed-by: Bradley Morgan <brads@mainlining.org>
> if (list_empty(&reorder->list))
> goto notfound;
>
>
--- Thanks!
prev parent reply other threads:[~2026-11-03 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 15:53 Tristan Madani
2026-11-02 16:26 ` Tristan Madani
2026-11-03 11:36 ` Bradley Morgan [this message]
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=9BC449D3-C881-406E-87AA-F023C1A864F8@mainlining.org \
--to=brads@mainlining.org \
--cc=daniel.m.jordan@oracle.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=tristan@talencesecurity.com \
--cc=tristmd@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®