mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] padata: fix lockdep warning in padata_find_next()
@ 2026-11-02 15:53 Tristan Madani
  2026-11-02 16:26 ` Tristan Madani
  2026-11-03 11:36 ` Bradley Morgan
  0 siblings, 2 replies; 3+ messages in thread
From: Tristan Madani @ 2026-11-02 15:53 UTC (permalink / raw)
  To: steffen.klassert, daniel.m.jordan
  Cc: herbert, linux-crypto, linux-kernel, stable, Tristan Madani

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);
 	if (list_empty(&reorder->list))
 		goto notfound;
 
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-03 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 15:53 [PATCH] padata: fix lockdep warning in padata_find_next() Tristan Madani
2026-11-02 16:26 ` Tristan Madani
2026-11-03 11:36 ` Bradley Morgan

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®