Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.145' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 74.543031][ T8440] [ 74.545489][ T8440] ====================================================== [ 74.552688][ T8440] WARNING: possible circular locking dependency detected [ 74.560353][ T8440] 5.13.0-rc2-next-20210518-syzkaller #0 Not tainted [ 74.567383][ T8440] ------------------------------------------------------ [ 74.574503][ T8440] syz-executor939/8440 is trying to acquire lock: [ 74.580923][ T8440] ffff88801a4b45a0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x250/0x9e0 [ 74.589806][ T8440] [ 74.589806][ T8440] but task is already holding lock: [ 74.597505][ T8440] ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 74.606392][ T8440] [ 74.606392][ T8440] which lock already depends on the new lock. [ 74.606392][ T8440] [ 74.616907][ T8440] [ 74.616907][ T8440] the existing dependency chain (in reverse order) is: [ 74.626008][ T8440] [ 74.626008][ T8440] -> #2 (bdev_lookup_sem){++++}-{3:3}: [ 74.633667][ T8440] down_write+0x92/0x150 [ 74.638457][ T8440] del_gendisk+0x222/0x9e0 [ 74.643404][ T8440] loop_control_ioctl+0x40d/0x4f0 [ 74.649060][ T8440] __x64_sys_ioctl+0x193/0x200 [ 74.654444][ T8440] do_syscall_64+0x31/0xb0 [ 74.659473][ T8440] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.665903][ T8440] [ 74.665903][ T8440] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 74.673584][ T8440] __mutex_lock+0x139/0x1120 [ 74.679069][ T8440] lo_open+0x1a/0x130 [ 74.683598][ T8440] __blkdev_get+0x135/0xa30 [ 74.688676][ T8440] blkdev_get_by_dev+0x200/0x660 [ 74.694281][ T8440] blkdev_open+0x154/0x2b0 [ 74.699355][ T8440] do_dentry_open+0x4b9/0x11c0 [ 74.704653][ T8440] path_openat+0x1c09/0x27d0 [ 74.709800][ T8440] do_filp_open+0x190/0x3d0 [ 74.714834][ T8440] do_sys_openat2+0x16d/0x420 [ 74.720042][ T8440] __x64_sys_open+0x119/0x1c0 [ 74.725353][ T8440] do_syscall_64+0x31/0xb0 [ 74.730299][ T8440] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.736726][ T8440] [ 74.736726][ T8440] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 74.744386][ T8440] __lock_acquire+0x2a17/0x5230 [ 74.749785][ T8440] lock_acquire+0x1ab/0x740 [ 74.754821][ T8440] __mutex_lock+0x139/0x1120 [ 74.760121][ T8440] del_gendisk+0x250/0x9e0 [ 74.765186][ T8440] loop_control_ioctl+0x40d/0x4f0 [ 74.770755][ T8440] __x64_sys_ioctl+0x193/0x200 [ 74.776062][ T8440] do_syscall_64+0x31/0xb0 [ 74.781107][ T8440] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.787546][ T8440] [ 74.787546][ T8440] other info that might help us debug this: [ 74.787546][ T8440] [ 74.797786][ T8440] Chain exists of: [ 74.797786][ T8440] &bdev->bd_mutex --> loop_ctl_mutex --> bdev_lookup_sem [ 74.797786][ T8440] [ 74.810762][ T8440] Possible unsafe locking scenario: [ 74.810762][ T8440] [ 74.818226][ T8440] CPU0 CPU1 [ 74.823606][ T8440] ---- ---- [ 74.829085][ T8440] lock(bdev_lookup_sem); [ 74.833521][ T8440] lock(loop_ctl_mutex); [ 74.840435][ T8440] lock(bdev_lookup_sem); [ 74.847409][ T8440] lock(&bdev->bd_mutex); [ 74.851844][ T8440] [ 74.851844][ T8440] *** DEADLOCK *** [ 74.851844][ T8440] [ 74.859998][ T8440] 2 locks held by syz-executor939/8440: [ 74.865560][ T8440] #0: ffffffff8cc73448 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 74.875354][ T8440] #1: ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 74.884712][ T8440] [ 74.884712][ T8440] stack backtrace: [ 74.890685][ T8440] CPU: 1 PID: 8440 Comm: syz-executor939 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 [ 74.900689][ T8440] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 74.910851][ T8440] Call Trace: [ 74.914152][ T8440] dump_stack_lvl+0x13e/0x1d6 [ 74.918864][ T8440] check_noncircular+0x25f/0x2e0 [ 74.923831][ T8440] ? kernel_text_address+0xbd/0xf0 [ 74.928966][ T8440] ? print_circular_bug+0x1e0/0x1e0 [ 74.934181][ T8440] ? create_prof_cpu_mask+0x20/0x20 [ 74.939416][ T8440] ? arch_stack_walk+0x93/0xe0 [ 74.944204][ T8440] ? lockdep_lock+0xc6/0x200 [ 74.948839][ T8440] ? call_rcu_zapped+0xb0/0xb0 [ 74.953623][ T8440] __lock_acquire+0x2a17/0x5230 [ 74.958574][ T8440] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 74.964568][ T8440] lock_acquire+0x1ab/0x740 [ 74.969082][ T8440] ? del_gendisk+0x250/0x9e0 [ 74.973787][ T8440] ? lock_release+0x720/0x720 [ 74.978571][ T8440] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 74.984569][ T8440] __mutex_lock+0x139/0x1120 [ 74.989262][ T8440] ? del_gendisk+0x250/0x9e0 [ 74.993873][ T8440] ? del_gendisk+0x250/0x9e0 [ 74.998481][ T8440] ? mutex_lock_io_nested+0xf70/0xf70 [ 75.003878][ T8440] ? down_write+0xe0/0x150 [ 75.008391][ T8440] ? down_write_killable+0x170/0x170 [ 75.013780][ T8440] ? sysfs_remove_files+0x87/0xf0 [ 75.018836][ T8440] del_gendisk+0x250/0x9e0 [ 75.023267][ T8440] loop_control_ioctl+0x40d/0x4f0 [ 75.028332][ T8440] ? loop_lookup+0x1d0/0x1d0 [ 75.032935][ T8440] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 75.039186][ T8440] ? loop_lookup+0x1d0/0x1d0 [ 75.043790][ T8440] __x64_sys_ioctl+0x193/0x200 [ 75.048797][ T8440] do_syscall_64+0x31/0xb0 [ 75.053235][ T8440] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 75.059150][ T8440] RIP: 0033:0x43ee49 [ 75.063061][ T8440] 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 [ 75.082994][ T8440] RSP: 002b:00007ffdfa4f5ed8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 75.091464][ T8440] RAX: ffffffffffffffda RB