Warning: Permanently added '10.128.0.227' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 68.438227][ T8430] [ 68.440907][ T8430] ====================================================== [ 68.447911][ T8430] WARNING: possible circular locking dependency detected [ 68.454914][ T8430] 5.13.0-rc5-syzkaller #0 Not tainted [ 68.460277][ T8430] ------------------------------------------------------ [ 68.467343][ T8430] syz-executor200/8430 is trying to acquire lock: [ 68.473739][ T8430] ffff88801aa22320 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x24b/0xa00 [ 68.482719][ T8430] [ 68.482719][ T8430] but task is already holding lock: [ 68.490093][ T8430] ffffffff8ca6dc88 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 68.499560][ T8430] [ 68.499560][ T8430] which lock already depends on the new lock. [ 68.499560][ T8430] [ 68.509946][ T8430] [ 68.509946][ T8430] the existing dependency chain (in reverse order) is: [ 68.518945][ T8430] [ 68.518945][ T8430] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 68.526637][ T8430] __mutex_lock+0x139/0x10c0 [ 68.531759][ T8430] lo_open+0x1a/0x130 [ 68.536255][ T8430] __blkdev_get+0x182/0xa30 [ 68.541474][ T8430] blkdev_get_by_dev+0x200/0x660 [ 68.547046][ T8430] blkdev_open+0x154/0x2b0 [ 68.551981][ T8430] do_dentry_open+0x4b9/0x11b0 [ 68.557255][ T8430] path_openat+0x1c0e/0x27e0 [ 68.562354][ T8430] do_filp_open+0x190/0x3d0 [ 68.567367][ T8430] do_sys_openat2+0x16d/0x420 [ 68.572551][ T8430] __x64_sys_open+0x119/0x1c0 [ 68.577733][ T8430] do_syscall_64+0x3a/0xb0 [ 68.582685][ T8430] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 68.589089][ T8430] [ 68.589089][ T8430] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 68.596807][ T8430] __lock_acquire+0x2a17/0x5230 [ 68.602168][ T8430] lock_acquire+0x1ab/0x740 [ 68.607183][ T8430] __mutex_lock+0x139/0x10c0 [ 68.612283][ T8430] del_gendisk+0x24b/0xa00 [ 68.617209][ T8430] loop_control_ioctl+0x40d/0x4f0 [ 68.622832][ T8430] __x64_sys_ioctl+0x193/0x200 [ 68.628107][ T8430] do_syscall_64+0x3a/0xb0 [ 68.633034][ T8430] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 68.639525][ T8430] [ 68.639525][ T8430] other info that might help us debug this: [ 68.639525][ T8430] [ 68.649750][ T8430] Possible unsafe locking scenario: [ 68.649750][ T8430] [ 68.657187][ T8430] CPU0 CPU1 [ 68.662534][ T8430] ---- ---- [ 68.667878][ T8430] lock(loop_ctl_mutex); [ 68.672194][ T8430] lock(&bdev->bd_mutex); [ 68.679110][ T8430] lock(loop_ctl_mutex); [ 68.685940][ T8430] lock(&bdev->bd_mutex); [ 68.690338][ T8430] [ 68.690338][ T8430] *** DEADLOCK *** [ 68.690338][ T8430] [ 68.698462][ T8430] 1 lock held by syz-executor200/8430: [ 68.704087][ T8430] #0: ffffffff8ca6dc88 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 68.713841][ T8430] [ 68.713841][ T8430] stack backtrace: [ 68.719911][ T8430] CPU: 1 PID: 8430 Comm: syz-executor200 Not tainted 5.13.0-rc5-syzkaller #0 [ 68.728675][ T8430] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 68.738728][ T8430] Call Trace: [ 68.742097][ T8430] dump_stack+0x141/0x1d7 [ 68.746418][ T8430] check_noncircular+0x25f/0x2e0 [ 68.751346][ T8430] ? print_circular_bug+0x1e0/0x1e0 [ 68.756538][ T8430] ? lockdep_lock+0xc6/0x200 [ 68.761117][ T8430] ? call_rcu_zapped+0xb0/0xb0 [ 68.765870][ T8430] ? mark_held_locks+0x9f/0xe0 [ 68.770627][ T8430] __lock_acquire+0x2a17/0x5230 [ 68.775472][ T8430] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 68.781543][ T8430] lock_acquire+0x1ab/0x740 [ 68.786053][ T8430] ? del_gendisk+0x24b/0xa00 [ 68.790749][ T8430] ? lock_release+0x720/0x720 [ 68.795523][ T8430] ? find_held_lock+0x2d/0x110 [ 68.800316][ T8430] __mutex_lock+0x139/0x10c0 [ 68.804935][ T8430] ? del_gendisk+0x24b/0xa00 [ 68.809519][ T8430] ? mutex_lock_io_nested+0xf20/0xf20 [ 68.814889][ T8430] ? del_gendisk+0x24b/0xa00 [ 68.819560][ T8430] ? __mutex_unlock_slowpath+0xe2/0x610 [ 68.825115][ T8430] ? mutex_lock_io_nested+0xf20/0xf20 [ 68.830478][ T8430] ? wait_for_completion_io+0x270/0x270 [ 68.836106][ T8430] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 68.842344][ T8430] ? kernfs_remove_by_name_ns+0x62/0xb0 [ 68.848193][ T8430] ? sysfs_remove_files+0x87/0xf0 [ 68.853230][ T8430] del_gendisk+0x24b/0xa00 [ 68.857654][ T8430] loop_control_ioctl+0x40d/0x4f0 [ 68.862690][ T8430] ? loop_lookup+0x1d0/0x1d0 [ 68.867274][ T8430] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 68.873510][ T8430] ? loop_lookup+0x1d0/0x1d0 [ 68.878092][ T8430] __x64_sys_ioctl+0x193/0x200 [ 68.882991][ T8430] do_syscall_64+0x3a/0xb0 [ 68.887400][ T8430] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 68.893283][ T8430] RIP: 0033:0x43ee49 [ 68.897171][ T8430] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48 [ 68.916874][ T8430] RSP: 002b:00007ffebe6a8368 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 68.925299][ T8430] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee49 [ 68.933260][ T8430] RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 [ 68.941217][ T8430] RBP: 0000000000402e30 R08: 0000000000000000 R09: 0000000000400488 [ 68.949350][ T8430] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ec0 [ 68.957495][ T8430] R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488