On Wed, 09 Jul 2025 19:17:44 +0800, Ming Lei wrote: > nbd grabs device lock nbd->config_lock for updating nr_hw_queues, this > ways cause the following lock dependency: > > -> #2 (&disk->open_mutex){+.+.}-{4:4}: > lock_acquire kernel/locking/lockdep.c:5871 [inline] > lock_acquire+0x1ac/0x448 kernel/locking/lockdep.c:5828 > __mutex_lock_common kernel/locking/mutex.c:602 [inline] > __mutex_lock+0x166/0x1292 kernel/locking/mutex.c:747 > mutex_lock_nested+0x14/0x1c kernel/locking/mutex.c:799 > __del_gendisk+0x132/0xac6 block/genhd.c:706 > del_gendisk+0xf6/0x19a block/genhd.c:819 > nbd_dev_remove+0x3c/0xf2 drivers/block/nbd.c:268 > nbd_dev_remove_work+0x1c/0x26 drivers/block/nbd.c:284 > process_one_work+0x96a/0x1f32 kernel/workqueue.c:3238 > process_scheduled_works kernel/workqueue.c:3321 [inline] > worker_thread+0x5ce/0xde8 kernel/workqueue.c:3402 > kthread+0x39c/0x7d4 kernel/kthread.c:464 > ret_from_fork_kernel+0x2a/0xbb2 arch/riscv/kernel/process.c:214 > ret_from_fork_kernel_asm+0x16/0x18 arch/riscv/kernel/entry.S:327 > > [...] Applied, thanks! [1/1] nbd: fix lockdep deadlock warning commit: 8b428f42f3edfd62422aa7ad87049ab232a2eaa9 Best regards, -- Jens Axboe