Warning: Permanently added '10.128.1.78' (ECDSA) to the list of known hosts. syzkaller login: [ 74.091987][ T8428] [ 74.094460][ T8428] ====================================================== [ 74.101461][ T8428] WARNING: possible circular locking dependency detected [ 74.108573][ T8428] 5.13.0-rc2-next-20210518-syzkaller #0 Not tainted [ 74.115144][ T8428] ------------------------------------------------------ [ 74.122222][ T8428] syz-executor107/8428 is trying to acquire lock: [ 74.128832][ T8428] ffff88801a8b45a0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x250/0x9e0 [ 74.138151][ T8428] [ 74.138151][ T8428] but task is already holding lock: [ 74.145599][ T8428] ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 74.154651][ T8428] [ 74.154651][ T8428] which lock already depends on the new lock. [ 74.154651][ T8428] [ 74.165228][ T8428] [ 74.165228][ T8428] the existing dependency chain (in reverse order) is: [ 74.174402][ T8428] [ 74.174402][ T8428] -> #2 (bdev_lookup_sem){++++}-{3:3}: [ 74.182116][ T8428] down_write+0x92/0x150 [ 74.186883][ T8428] del_gendisk+0x222/0x9e0 executing program [ 74.191808][ T8428] loop_control_ioctl+0x40d/0x4f0 [ 74.197355][ T8428] __x64_sys_ioctl+0x193/0x200 [ 74.202632][ T8428] do_syscall_64+0x31/0xb0 [ 74.207560][ T8428] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.214068][ T8428] [ 74.214068][ T8428] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 74.221620][ T8428] __mutex_lock+0x139/0x1120 [ 74.226730][ T8428] lo_open+0x1a/0x130 [ 74.231224][ T8428] __blkdev_get+0x135/0xa30 [ 74.236409][ T8428] blkdev_get_by_dev+0x200/0x660 [ 74.241877][ T8428] blkdev_open+0x154/0x2b0 [ 74.246807][ T8428] do_dentry_open+0x4b9/0x11c0 [ 74.252178][ T8428] path_openat+0x1c09/0x27d0 [ 74.257275][ T8428] do_filp_open+0x190/0x3d0 [ 74.262283][ T8428] do_sys_openat2+0x16d/0x420 [ 74.267568][ T8428] __x64_sys_open+0x119/0x1c0 [ 74.272765][ T8428] do_syscall_64+0x31/0xb0 [ 74.277689][ T8428] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.284093][ T8428] [ 74.284093][ T8428] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 74.291718][ T8428] __lock_acquire+0x2a17/0x5230 [ 74.297140][ T8428] lock_acquire+0x1ab/0x740 [ 74.302162][ T8428] __mutex_lock+0x139/0x1120 [ 74.307438][ T8428] del_gendisk+0x250/0x9e0 [ 74.312385][ T8428] loop_control_ioctl+0x40d/0x4f0 [ 74.317924][ T8428] __x64_sys_ioctl+0x193/0x200 [ 74.323203][ T8428] do_syscall_64+0x31/0xb0 [ 74.328146][ T8428] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.334566][ T8428] [ 74.334566][ T8428] other info that might help us debug this: [ 74.334566][ T8428] [ 74.344816][ T8428] Chain exists of: [ 74.344816][ T8428] &bdev->bd_mutex --> loop_ctl_mutex --> bdev_lookup_sem [ 74.344816][ T8428] [ 74.357778][ T8428] Possible unsafe locking scenario: [ 74.357778][ T8428] [ 74.365238][ T8428] CPU0 CPU1 [ 74.370678][ T8428] ---- ---- [ 74.376225][ T8428] lock(bdev_lookup_sem); [ 74.380631][ T8428] lock(loop_ctl_mutex); [ 74.387463][ T8428] lock(bdev_lookup_sem); [ 74.394427][ T8428] lock(&bdev->bd_mutex); [ 74.398858][ T8428] [ 74.398858][ T8428] *** DEADLOCK *** [ 74.398858][ T8428] [ 74.406995][ T8428] 2 locks held by syz-executor107/8428: [ 74.412546][ T8428] #0: ffffffff8cc73448 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 74.422586][ T8428] #1: ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 74.432049][ T8428] [ 74.432049][ T8428] stack backtrace: [ 74.437946][ T8428] CPU: 1 PID: 8428 Comm: syz-executor107 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 [ 74.447970][ T8428] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 74.458126][ T8428] Call Trace: [ 74.461401][ T8428] dump_stack_lvl+0x13e/0x1d6 [ 74.466112][ T8428] check_noncircular+0x25f/0x2e0 [ 74.471054][ T8428] ? kernel_text_address+0xbd/0xf0 [ 74.476168][ T8428] ? print_circular_bug+0x1e0/0x1e0 [ 74.481356][ T8428] ? create_prof_cpu_mask+0x20/0x20 [ 74.486563][ T8428] ? arch_stack_walk+0x93/0xe0 [ 74.491335][ T8428] ? lockdep_lock+0xc6/0x200 [ 74.495917][ T8428] ? call_rcu_zapped+0xb0/0xb0 [ 74.500673][ T8428] __lock_acquire+0x2a17/0x5230 [ 74.505513][ T8428] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 74.511490][ T8428] lock_acquire+0x1ab/0x740 [ 74.516088][ T8428] ? del_gendisk+0x250/0x9e0 [ 74.520681][ T8428] ? lock_release+0x720/0x720 [ 74.525364][ T8428] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 74.531350][ T8428] __mutex_lock+0x139/0x1120 [ 74.535936][ T8428] ? del_gendisk+0x250/0x9e0 [ 74.540532][ T8428] ? del_gendisk+0x250/0x9e0 [ 74.545124][ T8428] ? mutex_lock_io_nested+0xf70/0xf70 [ 74.550507][ T8428] ? down_write+0xe0/0x150 [ 74.555012][ T8428] ? down_write_killable+0x170/0x170 [ 74.560328][ T8428] ? sysfs_remove_files+0x87/0xf0 [ 74.565381][ T8428] del_gendisk+0x250/0x9e0 [ 74.570023][ T8428] loop_control_ioctl+0x40d/0x4f0 [ 74.575055][ T8428] ? loop_lookup+0x1d0/0x1d0 [ 74.579680][ T8428] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 74.586203][ T8428] ? loop_lookup+0x1d0/0x1d0 [ 74.590802][ T8428] __x64_sys_ioctl+0x193/0x200 [ 74.595667][ T8428] do_syscall_64+0x31/0xb0 [ 74.600084][ T8428] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.605988][ T8428] RIP: 0033:0x43ee49 [ 74.609974][ T8428] 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 [ 74.629588][ T8428] RSP: 002b:00007ffffc33fca8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 74.638135][ T8428] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee49 [ 74.646199][ T8428] RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 [ 74.654191][ T8428] RBP: 0000000000402e30 R08: 0000000000000000 R09: 0000000000400488 [ 74.662163][ T8428] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ec0 [ 74.670122][ T8428] R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488