====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.574/7635 is trying to acquire lock: ffffffff8e7b6368 (major_names_lock){+.+.}-{3:3}, at: blk_probe_dev block/genhd.c:779 [inline] ffffffff8e7b6368 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x35/0x290 block/genhd.c:795 but task is already holding lock: ffff88807c95c360 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: mddev_lock drivers/md/md.h:593 [inline] ffff88807c95c360 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: md_ioctl+0x72d/0x24e0 drivers/md/md.c:7831 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&mddev->reconfig_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 mddev_lock_nointr drivers/md/md.h:601 [inline] md_alloc+0x809/0xea0 drivers/md/md.c:5904 md_alloc_and_put+0x1a/0x1b0 drivers/md/md.c:5943 blk_probe_dev block/genhd.c:782 [inline] blk_request_module+0x272/0x290 block/genhd.c:-1 blkdev_get_no_open+0x37/0xc0 block/bdev.c:724 blkdev_get_by_dev+0x64/0x610 block/bdev.c:782 swsusp_check+0x5b/0x390 kernel/power/swap.c:1525 software_resume+0x4d/0x2d0 kernel/power/hibernate.c:958 resume_store+0x334/0x4c0 kernel/power/hibernate.c:1216 kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2021 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x474/0x9a0 fs/read_write.c:584 ksys_write+0x151/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (disks_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 md_alloc+0x41/0xea0 drivers/md/md.c:5844 md_alloc_and_put+0x1a/0x1b0 drivers/md/md.c:5943 blk_probe_dev block/genhd.c:782 [inline] blk_request_module+0x272/0x290 block/genhd.c:-1 blkdev_get_no_open+0x37/0xc0 block/bdev.c:724 blkdev_get_by_dev+0x64/0x610 block/bdev.c:782 swsusp_check+0x5b/0x390 kernel/power/swap.c:1525 software_resume+0x4d/0x2d0 kernel/power/hibernate.c:958 resume_store+0x334/0x4c0 kernel/power/hibernate.c:1216 kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2021 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x474/0x9a0 fs/read_write.c:584 ksys_write+0x151/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (major_names_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 blk_probe_dev block/genhd.c:779 [inline] blk_request_module+0x35/0x290 block/genhd.c:795 blkdev_get_no_open+0x37/0xc0 block/bdev.c:724 blkdev_get_by_dev+0x64/0x610 block/bdev.c:782 md_import_device+0x398/0x7b0 drivers/md/md.c:3841 md_add_new_disk+0x39d/0x17b0 drivers/md/md.c:6936 md_ioctl+0x2152/0x24e0 drivers/md/md.c:7927 blkdev_ioctl+0x5b2/0x730 block/ioctl.c:639 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: major_names_lock --> disks_mutex --> &mddev->reconfig_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mddev->reconfig_mutex); lock(disks_mutex); lock(&mddev->reconfig_mutex); lock(major_names_lock); *** DEADLOCK *** 1 lock held by syz.0.574/7635: #0: ffff88807c95c360 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: mddev_lock drivers/md/md.h:593 [inline] #0: ffff88807c95c360 (&mddev->reconfig_mutex){+.+.}-{3:3}, at: md_ioctl+0x72d/0x24e0 drivers/md/md.c:7831 stack backtrace: CPU: 1 PID: 7635 Comm: syz.0.574 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 blk_probe_dev block/genhd.c:779 [inline] blk_request_module+0x35/0x290 block/genhd.c:795 blkdev_get_no_open+0x37/0xc0 block/bdev.c:724 blkdev_get_by_dev+0x64/0x610 block/bdev.c:782 md_import_device+0x398/0x7b0 drivers/md/md.c:3841 md_add_new_disk+0x39d/0x17b0 drivers/md/md.c:6936 md_ioctl+0x2152/0x24e0 drivers/md/md.c:7927 blkdev_ioctl+0x5b2/0x730 block/ioctl.c:639 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f4de19a9519 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4de27a6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f4de1c35fa0 RCX: 00007f4de19a9519 RDX: 0000200000000040 RSI: 0000000040140921 RDI: 0000000000000003 RBP: 00007f4de1a39136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4de1c36038 R14: 00007f4de1c35fa0 R15: 00007ffcc6a96688 md: could not open device unknown-block(0,0). md: md_import_device returned -6