Warning: Permanently added '10.128.10.21' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 41.931003] [ 41.931357] ====================================================== [ 41.932338] [ INFO: possible circular locking dependency detected ] [ 41.933368] 4.9.141+ #23 Not tainted [ 41.933875] ------------------------------------------------------- [ 41.934820] syz-executor355/2058 is trying to acquire lock: [ 41.935637] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 41.936999] but task is already holding lock: [ 41.937702] (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x103/0x140 [ 41.939235] which lock already depends on the new lock. [ 41.939235] [ 41.940303] [ 41.940303] the existing dependency chain (in reverse order) is: [ 41.941528] -> #2 (&lo->lo_ctl_mutex#2){+.+...}: [ 41.942509] lock_acquire+0x130/0x3e0 [ 41.943104] mutex_lock_nested+0xc0/0x900 [ 41.943769] lo_release+0x85/0x1a0 [ 41.944333] __blkdev_put+0x636/0x840 [ 41.944966] blkdev_put+0x85/0x560 [ 41.945570] blkdev_close+0x8b/0xb0 [ 41.946152] __fput+0x263/0x700 [ 41.946710] ____fput+0x15/0x20 [ 41.947236] task_work_run+0x10c/0x180 [ 41.947870] exit_to_usermode_loop+0x129/0x150 [ 41.948665] do_syscall_64+0x3e2/0x550 [ 41.949280] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 41.950079] -> #1 (loop_index_mutex){+.+.+.}: [ 41.950905] lock_acquire+0x130/0x3e0 [ 41.953842] mutex_lock_nested+0xc0/0x900 [ 41.958494] lo_open+0x1b/0xa0 [ 41.962184] __blkdev_get+0x263/0xd60 [ 41.966490] blkdev_get+0x2da/0x920 [ 41.970618] blkdev_open+0x1a5/0x250 [ 41.974836] do_dentry_open+0x3ef/0xc90 [ 41.979306] vfs_open+0x11c/0x210 [ 41.983257] path_openat+0x542/0x2790 [ 41.987551] do_filp_open+0x197/0x270 [ 41.991848] do_sys_open+0x30d/0x5c0 [ 41.996063] SyS_open+0x2d/0x40 [ 42.000013] do_syscall_64+0x19f/0x550 [ 42.004406] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 42.010008] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 42.015059] __lock_acquire+0x3189/0x4a10 [ 42.019702] lock_acquire+0x130/0x3e0 [ 42.024104] mutex_lock_nested+0xc0/0x900 [ 42.028750] blkdev_reread_part+0x1e/0x40 [ 42.033538] loop_reread_partitions+0x7c/0x90 [ 42.038531] loop_set_status+0xa7e/0xfe0 [ 42.043092] loop_set_status_compat+0x9a/0xf0 [ 42.048209] lo_compat_ioctl+0x10e/0x140 [ 42.053007] compat_blkdev_ioctl+0x3a4/0x3630 [ 42.058000] compat_SyS_ioctl+0x12d/0x1fd0 [ 42.062744] do_fast_syscall_32+0x2f1/0xa10 [ 42.067564] entry_SYSENTER_compat+0x90/0xa2 [ 42.072469] [ 42.072469] other info that might help us debug this: [ 42.072469] [ 42.080591] Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 [ 42.090178] Possible unsafe locking scenario: [ 42.090178] [ 42.096222] CPU0 CPU1 [ 42.100868] ---- ---- [ 42.105512] lock(&lo->lo_ctl_mutex#2); [ 42.109912] lock(loop_index_mutex); [ 42.116446] lock(&lo->lo_ctl_mutex#2); [ 42.123371] lock(&bdev->bd_mutex); [ 42.127305] [ 42.127305] *** DEADLOCK *** [ 42.127305] [ 42.133339] 1 lock held by syz-executor355/2058: [ 42.138076] #0: (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x103/0x140 [ 42.148038] [ 42.148038] stack backtrace: [ 42.152525] CPU: 0 PID: 2058 Comm: syz-executor355 Not tainted 4.9.141+ #23 [ 42.159608] ffff8801cee87788 ffffffff81b42e79 ffffffff83c8e1b0 ffffffff83cb3c20 [ 42.167783] ffffffff83c8d430 ffff8801ced0a090 ffff8801ced097c0 ffff8801cee877d0 [ 42.175797] ffffffff813fee40 0000000000000001 00000000ced0a070 0000000000000001 [ 42.183799] Call Trace: [ 42.186372] [] dump_stack+0xc1/0x128 [ 42.191715] [] print_circular_bug.cold.36+0x2f7/0x432 [ 42.198588] [] __lock_acquire+0x3189/0x4a10 [ 42.204562] [] ? trace_hardirqs_on+0x10/0x10 [ 42.210796] [] ? __lock_acquire+0x654/0x4a10 [ 42.216926] [] lock_acquire+0x130/0x3e0 [ 42.222638] [] ? blkdev_reread_part+0x1e/0x40 [ 42.228812] [] ? blkdev_reread_part+0x1e/0x40 [ 42.234943] [] mutex_lock_nested+0xc0/0x900 [ 42.240908] [] ? blkdev_reread_part+0x1e/0x40 [ 42.247298] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 42.254164] [] ? mutex_trylock+0x3e0/0x3e0 [ 42.260030] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 42.266942] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 42.273773] [] blkdev_reread_part+0x1e/0x40 [ 42.279732] [] loop_reread_partitions+0x7c/0x90 [ 42.286172] [] loop_set_status+0xa7e/0xfe0 [ 42.292130] [] loop_set_status_compat+0x9a/0xf0 [ 42.298428] [] ? loop_set_status+0xfe0/0xfe0 [ 42.304464] [] lo_compat_ioctl+0x10e/0x140 [ 42.310334] [] ? lo_ioctl+0x1910/0x1910 [ 42.316036] [] compat_blkdev_ioctl+0x3a4/0x3630 [ 42.322483] [] ? __fget+0x214/0x3d0 [ 42.327750] [] ? cfq_merged_request+0x110/0x110 [ 42.334126] [] ? __fget+0x23b/0x3d0 [ 42.339397] [] ? __fget+0x47/0x3d0 [ 42.344568] [] ? security_file_ioctl+0x8f/0xc0 [ 42.350776] [] ? cfq_merged_request+0x110/0x110 [ 42.357214] [] compat_SyS_ioctl+0x12d/0x1fd0 [ 42.363257] [] ? do_ioctl+0x60/0x60 [ 42.368604] [] do_fast_syscall_32+0x2f1/0xa10 [ 42.374731] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.381382] [<