Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.65' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 71.749914][ T6559] [ 71.752357][ T6559] ====================================================== [ 71.759366][ T6559] WARNING: possible circular locking dependency detected [ 71.766464][ T6559] 5.14.0-next-20210901-syzkaller #0 Not tainted [ 71.772694][ T6559] ------------------------------------------------------ [ 71.779762][ T6559] syz-executor166/6559 is trying to acquire lock: [ 71.786153][ T6559] ffff88806d364230 (&mddev->open_mutex){+.+.}-{3:3}, at: md_open+0xfd/0x2e0 [ 71.794935][ T6559] [ 71.794935][ T6559] but task is already holding lock: [ 71.802273][ T6559] ffff88801bc8e918 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev.part.0+0x9b/0xb60 [ 71.812601][ T6559] [ 71.812601][ T6559] which lock already depends on the new lock. [ 71.812601][ T6559] [ 71.822976][ T6559] [ 71.822976][ T6559] the existing dependency chain (in reverse order) is: [ 71.831983][ T6559] [ 71.831983][ T6559] -> #1 (&disk->open_mutex){+.+.}-{3:3}: [ 71.839863][ T6559] __mutex_lock+0x131/0x12f0 [ 71.844957][ T6559] bd_register_pending_holders+0x2c/0x470 [ 71.851181][ T6559] device_add_disk+0x74c/0xfc0 [ 71.856445][ T6559] md_alloc+0x91d/0x1150 [ 71.861211][ T6559] md_probe+0x69/0x70 [ 71.865701][ T6559] blk_request_module+0x111/0x1d0 [ 71.871330][ T6559] blkdev_get_no_open+0x178/0x1e0 [ 71.876860][ T6559] blkdev_get_by_dev.part.0+0x22/0xb60 [ 71.882823][ T6559] blkdev_open+0x295/0x300 [ 71.887948][ T6559] do_dentry_open+0x4c8/0x11d0 [ 71.893237][ T6559] path_openat+0x1c9a/0x2740 [ 71.898606][ T6559] do_filp_open+0x1aa/0x400 [ 71.903631][ T6559] do_sys_openat2+0x16d/0x4d0 [ 71.908812][ T6559] __x64_sys_openat+0x13f/0x1f0 [ 71.914167][ T6559] do_syscall_64+0x35/0xb0 [ 71.919099][ T6559] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 71.925504][ T6559] [ 71.925504][ T6559] -> #0 (&mddev->open_mutex){+.+.}-{3:3}: [ 71.933475][ T6559] __lock_acquire+0x2a07/0x54a0 [ 71.938921][ T6559] lock_acquire+0x1ab/0x510 [ 71.943948][ T6559] __mutex_lock+0x131/0x12f0 [ 71.949060][ T6559] md_open+0xfd/0x2e0 [ 71.953549][ T6559] blkdev_get_whole+0x99/0x2a0 [ 71.958867][ T6559] blkdev_get_by_dev.part.0+0x354/0xb60 [ 71.965013][ T6559] blkdev_open+0x295/0x300 [ 71.969944][ T6559] do_dentry_open+0x4c8/0x11d0 [ 71.975214][ T6559] path_openat+0x1c9a/0x2740 [ 71.980313][ T6559] do_filp_open+0x1aa/0x400 [ 71.985317][ T6559] do_sys_openat2+0x16d/0x4d0 [ 71.990497][ T6559] __x64_sys_openat+0x13f/0x1f0 [ 71.995846][ T6559] do_syscall_64+0x35/0xb0 [ 72.000762][ T6559] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 72.007159][ T6559] [ 72.007159][ T6559] other info that might help us debug this: [ 72.007159][ T6559] [ 72.017364][ T6559] Possible unsafe locking scenario: [ 72.017364][ T6559] [ 72.024787][ T6559] CPU0 CPU1 [ 72.030135][ T6559] ---- ---- [ 72.035484][ T6559] lock(&disk->open_mutex); [ 72.040066][ T6559] lock(&mddev->open_mutex); [ 72.047242][ T6559] lock(&disk->open_mutex); [ 72.054330][ T6559] lock(&mddev->open_mutex); [ 72.058985][ T6559] [ 72.058985][ T6559] *** DEADLOCK *** [ 72.058985][ T6559] [ 72.067128][ T6559] 1 lock held by syz-executor166/6559: [ 72.072569][ T6559] #0: ffff88801bc8e918 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev.part.0+0x9b/0xb60 [ 72.083092][ T6559] [ 72.083092][ T6559] stack backtrace: [ 72.088954][ T6559] CPU: 0 PID: 6559 Comm: syz-executor166 Not tainted 5.14.0-next-20210901-syzkaller #0 [ 72.098574][ T6559] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 72.108612][ T6559] Call Trace: [ 72.111880][ T6559] dump_stack_lvl+0xcd/0x134 [ 72.116464][ T6559] check_noncircular+0x25f/0x2e0 [ 72.121390][ T6559] ? print_circular_bug+0x1e0/0x1e0 [ 72.126588][ T6559] ? is_bpf_text_address+0x99/0x170 [ 72.131777][ T6559] ? kernel_text_address+0xbd/0xf0 [ 72.136882][ T6559] ? lockdep_lock+0xc6/0x200 [ 72.141458][ T6559] ? call_rcu_zapped+0xb0/0xb0 [ 72.146212][ T6559] __lock_acquire+0x2a07/0x54a0 [ 72.151065][ T6559] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 72.157051][ T6559] lock_acquire+0x1ab/0x510 [ 72.161549][ T6559] ? md_open+0xfd/0x2e0 [ 72.165691][ T6559] ? lock_release+0x720/0x720 [ 72.170368][ T6559] __mutex_lock+0x131/0x12f0 [ 72.174943][ T6559] ? md_open+0xfd/0x2e0 [ 72.179088][ T6559] ? md_open+0xfd/0x2e0 [ 72.183313][ T6559] ? mutex_lock_io_nested+0x1150/0x1150 [ 72.188836][ T6559] ? lock_downgrade+0x6e0/0x6e0 [ 72.193695][ T6559] ? do_raw_spin_lock+0x120/0x2b0 [ 72.198697][ T6559] ? rwlock_bug.part.0+0x90/0x90 [ 72.203627][ T6559] ? mutex_lock_io_nested+0x1150/0x1150 [ 72.209155][ T6559] ? do_raw_spin_unlock+0x171/0x230 [ 72.214335][ T6559] md_open+0xfd/0x2e0 [ 72.218315][ T6559] ? rdev_size_store+0xb60/0xb60 [ 72.223236][ T6559] blkdev_get_whole+0x99/0x2a0 [ 72.227981][ T6559] blkdev_get_by_dev.part.0+0x354/0xb60 [ 72.233601][ T6559] ? devcgroup_check_permission+0x1bb/0x410 [ 72.239480][ T6559] blkdev_open+0x295/0x300 [ 72.243877][ T6559] do_dentry_open+0x4c8/0x11d0 [ 72.248641][ T6559] ? blkdev_get_by_dev+0x80/0x80 [ 72.253557][ T6559] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 72.259915][ T6559] ? may_open+0x1f6/0x420 [ 72.264235][ T6559] path_openat+0x1c9a/0x2740 [ 72.268824][ T6559] ? __filename_lookup+0x590/0x590 [ 72.273926][ T6559] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 72.279888][ T6559] do_filp_open+0x1aa/0x400 [ 72.284376][ T6559] ? may_open_dev+0xf0/0xf0 [ 72.288954][ T6559] ? alloc_fd+0x2f0/0x670 [ 72.293272][ T6559] ? rwlock_bug.part.0+0x90/0x90 [ 72.298196][ T6559] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 72.304418][ T6559] ? _find_next_bit+0x1e3/0x260 [ 72.309339][ T6559] ? _raw_spin_unlock+0x24/0x40 [ 72.314181][ T6559] ? alloc_fd+0x2f0/0x670 [ 72.318499][ T6559] do_sys_openat2+0x16d/0x4d0 [ 72.323157][ T6559] ? build_open_flags+0x6f0/0x6f0 [ 72.328257][ T6559] ? __context_tracking_exit+0xb8/0xe0 [ 72.333719][ T6559] ? lock_downgrade+0x6e0/0x6e0 [ 72.338560][ T6559] __x64_sys_openat+0x13f/0x1f0 [ 72.343400][ T6559] ? __ia32_sys_open+0x1c0/0x1c0 [ 72.348323][ T6559] ? syscall_enter_from_user_mode+0x21/0x70 [ 72.354200][ T6559] do_syscall_64+0x35/0xb0 [ 72.358598][ T6559] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 72.364475][ T6559] RIP: 0033:0x445359 [ 72.368351][ T6559] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 [ 72.387967][ T6559] RSP: 002b:00007fe8f59c32f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 72.396371][ T6559] RAX: ffffffffffffffda RBX: 00000000004cc4f0 RCX: 00