[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aebcb155-d161-46a1-b120-f247a3eaf5a2@I-love.SAKURA.ne.jp>
Date: Tue, 8 Jul 2025 11:19:28 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Hillf Danton <hdanton@...a.com>
Cc: Bart Van Assche <bvanassche@....org>, axboe@...nel.dk,
josef@...icpanda.com, linux-block@...r.kernel.org,
syzbot <syzbot+3dbc6142c85cc77eaf04@...kaller.appspotmail.com>,
Ming Lei <ming.lei@...hat.com>, linux-kernel@...r.kernel.org,
nbd@...er.debian.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [nbd?] possible deadlock in nbd_queue_rq
On 2025/07/08 10:24, Hillf Danton wrote:
> On Tue, 8 Jul 2025 09:52:18 +0900 Tetsuo Handa wrote:
>> On 2025/07/08 9:18, Hillf Danton wrote:
>>> On Mon, 7 Jul 2025 10:39:44 -0700 Bart Van Assche wrote:
>>>> On 7/6/25 5:59 PM, Hillf Danton wrote:
>>>>> and given the second one, the report is false positive.
>>>>
>>>> Whether or not this report is a false positive, the root cause should be
>>>> fixed because lockdep disables itself after the first circular locking
>>>> complaint. From print_usage_bug() in kernel/locking/lockdep.c:
>>>>
>>>> if (!debug_locks_off() || debug_locks_silent)
>>>> return;
>>>>
>>> The root cause could be walked around for example by trying not to init
>>> nbd more than once.
>>
>> How did you come to think so?
>>
> Based on that nbd_init appears twice in the lock chain syzbot reported.
>
You might be misunderstanding what the lock chain is reporting.
The stack backtrace of a lock is taken only when that lock is taken
for the first time. That is, two stack backtraces from two locks might
share one or more functions. Also, the stack backtrace of a lock which
is printed when lockdep fired might not be a backtrace of that lock
when actual deadlock happens.
You need to understand all possible locking patterns (because lockdep
can associate only one backtrace with one lock) before you conclude
that the report is a false positive.
>> nbd_init() is already called only once because of module_init(nbd_init).
>>
> Ok Bart is misguiding.
Powered by blists - more mailing lists