Warning: Permanently added '10.128.1.99' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 77.573508][ T8436] [ 77.576124][ T8436] ====================================================== [ 77.583315][ T8436] WARNING: possible circular locking dependency detected [ 77.590664][ T8436] 5.13.0-rc2-next-20210518-syzkaller #0 Not tainted [ 77.597348][ T8436] ------------------------------------------------------ [ 77.604360][ T8436] syz-executor987/8436 is trying to acquire lock: [ 77.610818][ T8436] ffff88814586c5a0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x250/0x9e0 [ 77.619881][ T8436] [ 77.619881][ T8436] but task is already holding lock: [ 77.627228][ T8436] ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 77.636113][ T8436] [ 77.636113][ T8436] which lock already depends on the new lock. [ 77.636113][ T8436] [ 77.646491][ T8436] [ 77.646491][ T8436] the existing dependency chain (in reverse order) is: [ 77.655479][ T8436] [ 77.655479][ T8436] -> #2 (bdev_lookup_sem){++++}-{3:3}: [ 77.663182][ T8436] down_write+0x92/0x150 [ 77.667972][ T8436] del_gendisk+0x222/0x9e0 [ 77.672918][ T8436] loop_control_ioctl+0x40d/0x4f0 [ 77.678467][ T8436] __x64_sys_ioctl+0x193/0x200 [ 77.683756][ T8436] do_syscall_64+0x31/0xb0 [ 77.688796][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 77.695211][ T8436] [ 77.695211][ T8436] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 77.702769][ T8436] __mutex_lock+0x139/0x1120 [ 77.707972][ T8436] lo_open+0x1a/0x130 [ 77.712467][ T8436] __blkdev_get+0x135/0xa30 [ 77.717488][ T8436] blkdev_get_by_dev+0x200/0x660 [ 77.722942][ T8436] blkdev_open+0x154/0x2b0 [ 77.727865][ T8436] do_dentry_open+0x4b9/0x11c0 [ 77.733127][ T8436] path_openat+0x1c09/0x27d0 [ 77.738222][ T8436] do_filp_open+0x190/0x3d0 [ 77.743234][ T8436] do_sys_openat2+0x16d/0x420 [ 77.748413][ T8436] __x64_sys_open+0x119/0x1c0 [ 77.753593][ T8436] do_syscall_64+0x31/0xb0 [ 77.758522][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 77.764927][ T8436] [ 77.764927][ T8436] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 77.772718][ T8436] __lock_acquire+0x2a17/0x5230 [ 77.778091][ T8436] lock_acquire+0x1ab/0x740 [ 77.783093][ T8436] __mutex_lock+0x139/0x1120 [ 77.788183][ T8436] del_gendisk+0x250/0x9e0 [ 77.793103][ T8436] loop_control_ioctl+0x40d/0x4f0 [ 77.798633][ T8436] __x64_sys_ioctl+0x193/0x200 [ 77.803913][ T8436] do_syscall_64+0x31/0xb0 [ 77.808849][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 77.815253][ T8436] [ 77.815253][ T8436] other info that might help us debug this: [ 77.815253][ T8436] [ 77.825579][ T8436] Chain exists of: [ 77.825579][ T8436] &bdev->bd_mutex --> loop_ctl_mutex --> bdev_lookup_sem [ 77.825579][ T8436] [ 77.838506][ T8436] Possible unsafe locking scenario: [ 77.838506][ T8436] [ 77.845972][ T8436] CPU0 CPU1 [ 77.851318][ T8436] ---- ---- [ 77.856779][ T8436] lock(bdev_lookup_sem); [ 77.861181][ T8436] lock(loop_ctl_mutex); [ 77.868140][ T8436] lock(bdev_lookup_sem); [ 77.875074][ T8436] lock(&bdev->bd_mutex); [ 77.879495][ T8436] [ 77.879495][ T8436] *** DEADLOCK *** [ 77.879495][ T8436] [ 77.887614][ T8436] 2 locks held by syz-executor987/8436: [ 77.893135][ T8436] #0: ffffffff8cc73448 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 77.902877][ T8436] #1: ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 77.912171][ T8436] [ 77.912171][ T8436] stack backtrace: [ 77.918046][ T8436] CPU: 0 PID: 8436 Comm: syz-executor987 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 [ 77.928000][ T8436] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 77.938050][ T8436] Call Trace: [ 77.941338][ T8436] dump_stack_lvl+0x13e/0x1d6 [ 77.946046][ T8436] check_noncircular+0x25f/0x2e0 [ 77.951080][ T8436] ? kernel_text_address+0xbd/0xf0 [ 77.956180][ T8436] ? print_circular_bug+0x1e0/0x1e0 [ 77.961363][ T8436] ? create_prof_cpu_mask+0x20/0x20 [ 77.966569][ T8436] ? arch_stack_walk+0x93/0xe0 [ 77.971325][ T8436] ? lockdep_lock+0xc6/0x200 [ 77.975900][ T8436] ? call_rcu_zapped+0xb0/0xb0 [ 77.980647][ T8436] __lock_acquire+0x2a17/0x5230 [ 77.985580][ T8436] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 77.991543][ T8436] lock_acquire+0x1ab/0x740 [ 77.996201][ T8436] ? del_gendisk+0x250/0x9e0 [ 78.000778][ T8436] ? lock_release+0x720/0x720 [ 78.005616][ T8436] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 78.011577][ T8436] __mutex_lock+0x139/0x1120 [ 78.016154][ T8436] ? del_gendisk+0x250/0x9e0 [ 78.020733][ T8436] ? del_gendisk+0x250/0x9e0 [ 78.025308][ T8436] ? mutex_lock_io_nested+0xf70/0xf70 [ 78.030672][ T8436] ? down_write+0xe0/0x150 [ 78.035068][ T8436] ? down_write_killable+0x170/0x170 [ 78.040689][ T8436] ? sysfs_remove_files+0x87/0xf0 [ 78.045711][ T8436] del_gendisk+0x250/0x9e0 [ 78.050123][ T8436] loop_control_ioctl+0x40d/0x4f0 [ 78.055307][ T8436] ? loop_lookup+0x1d0/0x1d0 [ 78.059933][ T8436] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 78.066275][ T8436] ? loop_lookup+0x1d0/0x1d0 [ 78.070949][ T8436] __x64_sys_ioctl+0x193/0x200 [ 78.075706][ T8436] do_syscall_64+0x31/0xb0 [ 78.080194][ T8436] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 78.086071][ T8436] RIP: 0033:0x43ee49 [ 78.090041][ 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 [ 78.109631][ T8436] RSP: 002b:00007ffe08ca51a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 78.118028][ T8436] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee49 [