Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.122' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 70.875283][ T8444] [ 70.877908][ T8444] ====================================================== [ 70.885165][ T8444] WARNING: possible circular locking dependency detected [ 70.892174][ T8444] 5.13.0-rc5-syzkaller #0 Not tainted [ 70.897684][ T8444] ------------------------------------------------------ [ 70.904690][ T8444] syz-executor432/8444 is trying to acquire lock: [ 70.911214][ T8444] ffff888145712320 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x24b/0xa00 [ 70.920201][ T8444] [ 70.920201][ T8444] but task is already holding lock: [ 70.927569][ T8444] ffffffff8ca6dec8 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 70.936869][ T8444] [ 70.936869][ T8444] which lock already depends on the new lock. [ 70.936869][ T8444] [ 70.947260][ T8444] [ 70.947260][ T8444] the existing dependency chain (in reverse order) is: [ 70.956298][ T8444] [ 70.956298][ T8444] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 70.963882][ T8444] __mutex_lock+0x139/0x10c0 [ 70.969032][ T8444] lo_open+0x1a/0x130 [ 70.973546][ T8444] __blkdev_get+0x182/0xa30 [ 70.978581][ T8444] blkdev_get_by_dev+0x200/0x660 [ 70.984153][ T8444] blkdev_open+0x154/0x2b0 [ 70.989102][ T8444] do_dentry_open+0x4b9/0x11b0 [ 70.994599][ T8444] path_openat+0x1c0e/0x27e0 [ 70.999729][ T8444] do_filp_open+0x190/0x3d0 [ 71.004946][ T8444] do_sys_openat2+0x16d/0x420 [ 71.010331][ T8444] __x64_sys_open+0x119/0x1c0 [ 71.015557][ T8444] do_syscall_64+0x3a/0xb0 [ 71.020536][ T8444] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 71.026980][ T8444] [ 71.026980][ T8444] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 71.034644][ T8444] __lock_acquire+0x2a17/0x5230 [ 71.040040][ T8444] lock_acquire+0x1ab/0x740 [ 71.045165][ T8444] __mutex_lock+0x139/0x10c0 [ 71.050286][ T8444] del_gendisk+0x24b/0xa00 [ 71.055320][ T8444] loop_control_ioctl+0x40d/0x4f0 [ 71.060887][ T8444] __do_compat_sys_ioctl+0x1c7/0x290 [ 71.066707][ T8444] __do_fast_syscall_32+0x67/0xe0 [ 71.072360][ T8444] do_fast_syscall_32+0x2f/0x70 [ 71.077836][ T8444] entry_SYSENTER_compat_after_hwframe+0x4d/0x5c [ 71.084961][ T8444] [ 71.084961][ T8444] other info that might help us debug this: [ 71.084961][ T8444] [ 71.095496][ T8444] Possible unsafe locking scenario: [ 71.095496][ T8444] [ 71.103182][ T8444] CPU0 CPU1 [ 71.108848][ T8444] ---- ---- [ 71.114276][ T8444] lock(loop_ctl_mutex); [ 71.118743][ T8444] lock(&bdev->bd_mutex); [ 71.125959][ T8444] lock(loop_ctl_mutex); [ 71.135169][ T8444] lock(&bdev->bd_mutex); [ 71.139606][ T8444] [ 71.139606][ T8444] *** DEADLOCK *** [ 71.139606][ T8444] [ 71.147755][ T8444] 1 lock held by syz-executor432/8444: [ 71.153261][ T8444] #0: ffffffff8ca6dec8 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 71.163331][ T8444] [ 71.163331][ T8444] stack backtrace: [ 71.169260][ T8444] CPU: 1 PID: 8444 Comm: syz-executor432 Not tainted 5.13.0-rc5-syzkaller #0 [ 71.178030][ T8444] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 71.188210][ T8444] Call Trace: [ 71.191556][ T8444] dump_stack+0x141/0x1d7 [ 71.195900][ T8444] check_noncircular+0x25f/0x2e0 [ 71.201001][ T8444] ? print_circular_bug+0x1e0/0x1e0 [ 71.206221][ T8444] ? lockdep_lock+0xc6/0x200 [ 71.210829][ T8444] ? call_rcu_zapped+0xb0/0xb0 [ 71.215608][ T8444] ? mark_held_locks+0x9f/0xe0 [ 71.220449][ T8444] __lock_acquire+0x2a17/0x5230 [ 71.225319][ T8444] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 71.231330][ T8444] lock_acquire+0x1ab/0x740 [ 71.235852][ T8444] ? del_gendisk+0x24b/0xa00 [ 71.240455][ T8444] ? lock_release+0x720/0x720 [ 71.245175][ T8444] ? find_held_lock+0x2d/0x110 [ 71.249956][ T8444] __mutex_lock+0x139/0x10c0 [ 71.254558][ T8444] ? del_gendisk+0x24b/0xa00 [ 71.259197][ T8444] ? mutex_lock_io_nested+0xf20/0xf20 [ 71.264704][ T8444] ? del_gendisk+0x24b/0xa00 [ 71.269322][ T8444] ? __mutex_unlock_slowpath+0xe2/0x610 [ 71.274891][ T8444] ? mutex_lock_io_nested+0xf20/0xf20 [ 71.280296][ T8444] ? wait_for_completion_io+0x270/0x270 [ 71.285879][ T8444] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 71.292296][ T8444] ? kernfs_remove_by_name_ns+0x62/0xb0 [ 71.297980][ T8444] ? sysfs_remove_files+0x87/0xf0 [ 71.303050][ T8444] del_gendisk+0x24b/0xa00 [ 71.307489][ T8444] loop_control_ioctl+0x40d/0x4f0 [ 71.312527][ T8444] ? loop_lookup+0x1d0/0x1d0 [ 71.317144][ T8444] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 71.323414][ T8444] ? loop_lookup+0x1d0/0x1d0 [ 71.328064][ T8444] __do_compat_sys_ioctl+0x1c7/0x290 [ 71.333455][ T8444] __do_fast_syscall_32+0x67/0xe0 [ 71.338503][ T8444] do_fast_syscall_32+0x2f/0x70 [ 71.343504][ T8444] entry_SYSENTER_compat_after_hwframe+0x4d/0x5c [ 71.349887][ T8444] RIP: 0023:0xf7fc9549 [ 71.354008][ T8444] Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 [ 71.373843][ T8444] RSP: 002b:00000000ffbcc05c EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 71.384733][ T8444] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000004c81 [ 71.392723][ T8444] RDX: 0000000000000000 RSI: 00000000ffbcc0b0 RDI: 00000000080e3000 [ 71.400711][ T8444] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 71.408703][ T8444] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 71.416719][ T8444] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000