[PATCH] padata: fix lockdep warning in padata_find_next()
From: Tristan Madani
Date: Mon Nov 02 2026 - 13:27:34 EST
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@xxxxxxxxxxxxxxx
Signed-off-by: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>
---
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