Warning: Permanently added '10.128.0.196' (ECDSA) to the list of known hosts. syzkaller login: [ 69.453729][ T8436] [ 69.456169][ T8436] ====================================================== [ 69.463172][ T8436] WARNING: possible circular locking dependency detected [ 69.470171][ T8436] 5.13.0-rc2-next-20210518-syzkaller #0 Not tainted [ 69.476734][ T8436] ------------------------------------------------------ [ 69.483726][ T8436] syz-executor294/8436 is trying to acquire lock: [ 69.490116][ T8436] ffff888144b845a0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x250/0x9e0 [ 69.498978][ T8436] [ 69.498978][ T8436] but task is already holding lock: [ 69.506404][ T8436] ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 69.515268][ T8436] [ 69.515268][ T8436] which lock already depends on the new lock. [ 69.515268][ T8436] [ 69.525645][ T8436] [ 69.525645][ T8436] the existing dependency chain (in reverse order) is: [ 69.534659][ T8436] [ 69.534659][ T8436] -> #2 (bdev_lookup_sem){++++}-{3:3}: [ 69.542277][ T8436] down_write+0x92/0x150 [ 69.547066][ T8436] del_gendisk+0x222/0x9e0 [ 69.551987][ T8436] loop_control_ioctl+0x40d/0x4f0 [ 69.557515][ T8436] __x64_sys_ioctl+0x193/0x200 [ 69.562782][ T8436] do_syscall_64+0x31/0xb0 [ 69.567700][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 69.574100][ T8436] [ 69.574100][ T8436] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 69.581640][ T8436] __mutex_lock+0x139/0x1120 [ 69.586736][ T8436] lo_open+0x1a/0x130 [ 69.591782][ T8436] __blkdev_get+0x135/0xa30 [ 69.596826][ T8436] blkdev_get_by_dev+0x200/0x660 [ 69.602270][ T8436] blkdev_open+0x154/0x2b0 [ 69.607198][ T8436] do_dentry_open+0x4b9/0x11c0 [ 69.612470][ T8436] path_openat+0x1c09/0x27d0 [ 69.617565][ T8436] do_filp_open+0x190/0x3d0 [ 69.622572][ T8436] do_sys_openat2+0x16d/0x420 [ 69.627750][ T8436] __x64_sys_open+0x119/0x1c0 [ 69.632929][ T8436] do_syscall_64+0x31/0xb0 [ 69.637852][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 69.644263][ T8436] [ 69.644263][ T8436] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 69.651881][ T8436] __lock_acquire+0x2a17/0x5230 [ 69.657234][ T8436] lock_acquire+0x1ab/0x740 [ 69.662234][ T8436] __mutex_lock+0x139/0x1120 [ 69.667498][ T8436] del_gendisk+0x250/0x9e0 [ 69.672424][ T8436] loop_control_ioctl+0x40d/0x4f0 [ 69.678041][ T8436] __x64_sys_ioctl+0x193/0x200 [ 69.683324][ T8436] do_syscall_64+0x31/0xb0 [ 69.688243][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 69.694638][ T8436] [ 69.694638][ T8436] other info that might help us debug this: [ 69.694638][ T8436] [ 69.704842][ T8436] Chain exists of: [ 69.704842][ T8436] &bdev->bd_mutex --> loop_ctl_mutex --> bdev_lookup_sem [ 69.704842][ T8436] [ 69.717862][ T8436] Possible unsafe locking scenario: [ 69.717862][ T8436] [ 69.725299][ T8436] CPU0 CPU1 [ 69.730642][ T8436] ---- ---- [ 69.736246][ T8436] lock(bdev_lookup_sem); [ 69.740639][ T8436] lock(loop_ctl_mutex); [ 69.747654][ T8436] lock(bdev_lookup_sem); [ 69.754568][ T8436] lock(&bdev->bd_mutex); [ 69.758962][ T8436] [ 69.758962][ T8436] *** DEADLOCK *** [ 69.758962][ T8436] [ 69.767083][ T8436] 2 locks held by syz-executor294/8436: [ 69.772604][ T8436] #0: ffffffff8cc73448 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 69.782340][ T8436] #1: ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 69.791629][ T8436] [ 69.791629][ T8436] stack backtrace: executing program [ 69.797503][ T8436] CPU: 1 PID: 8436 Comm: syz-executor294 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 [ 69.807469][ T8436] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 69.817511][ T8436] Call Trace: [ 69.820801][ T8436] dump_stack_lvl+0x13e/0x1d6 [ 69.825469][ T8436] check_noncircular+0x25f/0x2e0 [ 69.830395][ T8436] ? kernel_text_address+0xbd/0xf0 [ 69.835489][ T8436] ? print_circular_bug+0x1e0/0x1e0 [ 69.840690][ T8436] ? create_prof_cpu_mask+0x20/0x20 [ 69.845872][ T8436] ? arch_stack_walk+0x93/0xe0 [ 69.850622][ T8436] ? lockdep_lock+0xc6/0x200 [ 69.855204][ T8436] ? call_rcu_zapped+0xb0/0xb0 [ 69.859965][ T8436] __lock_acquire+0x2a17/0x5230 [ 69.865050][ T8436] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.871028][ T8436] lock_acquire+0x1ab/0x740 [ 69.875519][ T8436] ? del_gendisk+0x250/0x9e0 [ 69.880095][ T8436] ? lock_release+0x720/0x720 [ 69.884751][ T8436] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.890714][ T8436] __mutex_lock+0x139/0x1120 [ 69.895341][ T8436] ? del_gendisk+0x250/0x9e0 [ 69.899918][ T8436] ? del_gendisk+0x250/0x9e0 [ 69.904493][ T8436] ? mutex_lock_io_nested+0xf70/0xf70 [ 69.909847][ T8436] ? down_write+0xe0/0x150 [ 69.914242][ T8436] ? down_write_killable+0x170/0x170 [ 69.919633][ T8436] ? sysfs_remove_files+0x87/0xf0 [ 69.924642][ T8436] del_gendisk+0x250/0x9e0 [ 69.929374][ T8436] loop_control_ioctl+0x40d/0x4f0 [ 69.934387][ T8436] ? loop_lookup+0x1d0/0x1d0 [ 69.938960][ T8436] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 69.945200][ T8436] ? loop_lookup+0x1d0/0x1d0 [ 69.949876][ T8436] __x64_sys_ioctl+0x193/0x200 [ 69.954625][ T8436] do_syscall_64+0x31/0xb0 [ 69.959108][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 69.964984][ T8436] RIP: 0033:0x43ee69 [ 69.968856][ T8436] 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 [ 69.988457][ T8436] RSP: 002b:00007ffff14a1ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 69.996868][ T8436] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee69 [ 70.004840][ T