sd 2:0:0:1: [sdc] Test Unit Ready failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK ============================================ WARNING: possible recursive locking detected 6.12.0-rc5-next-20241101-syzkaller #0 Not tainted -------------------------------------------- udevd/5987 is trying to acquire lock: ffff88802750c4b0 (&q->q_usage_counter(queue)#53){++++}-{0:0}, at: blk_mq_alloc_request+0x26b/0xab0 block/blk-mq.c:626 but task is already holding lock: ffff88802750c4b0 (&q->q_usage_counter(queue)#53){++++}-{0:0}, at: blk_freeze_queue block/blk-mq.c:177 [inline] ffff88802750c4b0 (&q->q_usage_counter(queue)#53){++++}-{0:0}, at: blk_mq_freeze_queue+0x15/0x20 block/blk-mq.c:187 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&q->q_usage_counter(queue)#53); lock(&q->q_usage_counter(queue)#53); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by udevd/5987: #0: ffff888033ac44c8 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xf0/0xc50 block/bdev.c:904 #1: ffff88802750c478 (&q->q_usage_counter(io)#69){+.+.}-{0:0}, at: blk_freeze_queue block/blk-mq.c:177 [inline] #1: ffff88802750c478 (&q->q_usage_counter(io)#69){+.+.}-{0:0}, at: blk_mq_freeze_queue+0x15/0x20 block/blk-mq.c:187 #2: ffff88802750c4b0 (&q->q_usage_counter(queue)#53){++++}-{0:0}, at: blk_freeze_queue block/blk-mq.c:177 [inline] #2: ffff88802750c4b0 (&q->q_usage_counter(queue)#53){++++}-{0:0}, at: blk_mq_freeze_queue+0x15/0x20 block/blk-mq.c:187 stack backtrace: CPU: 0 UID: 0 PID: 5987 Comm: udevd Not tainted 6.12.0-rc5-next-20241101-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 blk_queue_enter+0xe1/0x600 block/blk-core.c:328 blk_mq_alloc_request+0x26b/0xab0 block/blk-mq.c:626 scsi_alloc_request drivers/scsi/scsi_lib.c:1222 [inline] scsi_execute_cmd+0x177/0x1090 drivers/scsi/scsi_lib.c:304 ioctl_internal_command+0x16a/0x7f0 drivers/scsi/scsi_ioctl.c:79 scsi_set_medium_removal+0x15a/0x340 drivers/scsi/scsi_ioctl.c:139 sd_open+0x43c/0x610 drivers/scsi/sd.c:1564 blkdev_get_whole+0x8e/0x450 block/bdev.c:689 bdev_open+0x2d4/0xc50 block/bdev.c:916 blkdev_open+0x389/0x4f0 block/fops.c:627 do_dentry_open+0xbe1/0x1b70 fs/open.c:962 vfs_open+0x3e/0x330 fs/open.c:1092 do_open fs/namei.c:3774 [inline] path_openat+0x2c84/0x3590 fs/namei.c:3933 do_filp_open+0x235/0x490 fs/namei.c:3960 do_sys_openat2+0x13e/0x1d0 fs/open.c:1419 do_sys_open fs/open.c:1434 [inline] __do_sys_openat fs/open.c:1450 [inline] __se_sys_openat fs/open.c:1445 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1445 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff5fdf169a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007fff968ccd00 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000055a635177b20 RCX: 00007ff5fdf169a4 RDX: 00000000000a0800 RSI: 000055a63516da70 RDI: 00000000ffffff9c RBP: 000055a63516da70 R08: 0000000000000006 R09: 7fffffffffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a0800 R13: 000055a6351657c0 R14: 0000000000000001 R15: 000055a635151910 udevd[5987]: inotify_add_watch(7, /dev/sdc, 10) failed: No such file or directory sd 1:0:0:1: [sdc] Test Unit Ready failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK udevd[5987]: inotify_add_watch(7, /dev/sdc, 10) failed: No such file or directory sd 1:0:0:1: [sdc] Test Unit Ready failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK