Re: padata: Is padata_find_next() thread-safe?

From: Tetsuo Handa

Date: Thu Nov 06 2025 - 04:41:44 EST


On 2025/11/06 18:28, Herbert Xu wrote:
> On Tue, Nov 04, 2025 at 08:44:53PM +0900, Tetsuo Handa wrote:
>> syzbot is reporting possibility of recursive locking at
>> https://syzkaller.appspot.com/bug?extid=bd936ccd4339cea66e6b .
>> If this is a false positive report, the fix will be as simple as
>
> Yes it's a false positive as reorder->lock is never the same as
> squeue->serial.lock.

OK. But what is about the "Can a sequence shown below possible?" part?

>
> However, they both have the same data type which is why lockdep
> is confused.
>
> Please provide a patch that sets the class for one of them to
> something different. For example, change the lockdep class for
> reorder->lock using lockdep_set_class and the problem should go
> away.

Is using _nested(lock, 1) wrong?