Warning: Permanently added '10.128.0.6' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 40.632152] [ 40.633787] ====================================================== [ 40.640074] [ INFO: possible circular locking dependency detected ] [ 40.646452] 4.4.174+ #17 Not tainted [ 40.650145] ------------------------------------------------------- [ 40.656521] syz-executor827/2080 is trying to acquire lock: [ 40.662209] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1f/0x40 [ 40.671340] [ 40.671340] but task is already holding lock: [ 40.677285] (loop_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x105/0x140 [ 40.686573] [ 40.686573] which lock already depends on the new lock. [ 40.686573] [ 40.694864] [ 40.694864] the existing dependency chain (in reverse order) is: [ 40.702477] -> #2 (loop_ctl_mutex#2){+.+...}: [ 40.707766] [] lock_acquire+0x15e/0x450 [ 40.714027] [] mutex_lock_nested+0xc1/0xb80 [ 40.720615] [] lo_release+0x84/0x1b0 [ 40.726613] [] __blkdev_put+0x461/0x840 [ 40.732851] [] blkdev_put+0x88/0x560 [ 40.738828] [] blkdev_close+0x8b/0xb0 [ 40.744907] [] __fput+0x246/0x710 [ 40.750624] [] ____fput+0x16/0x20 [ 40.756341] [] task_work_run+0x202/0x2b0 [ 40.762665] [] exit_to_usermode_loop+0x14a/0x170 [ 40.769704] [] syscall_return_slowpath+0x25b/0x2e0 [ 40.776896] [] int_ret_from_sys_call+0x25/0xa3 [ 40.784006] -> #1 (loop_index_mutex){+.+.+.}: [ 40.789125] [] lock_acquire+0x15e/0x450 [ 40.795361] [] mutex_lock_nested+0xc1/0xb80 [ 40.801948] [] lo_open+0x1d/0xb0 [ 40.807580] [] __blkdev_get+0x2ae/0xdf0 [ 40.813816] [] blkdev_get+0x2e8/0x920 [ 40.819913] [] blkdev_open+0x1aa/0x250 [ 40.826091] [] do_dentry_open+0x38f/0xbd0 [ 40.832527] [] vfs_open+0x10b/0x210 [ 40.838419] [] path_openat+0x136f/0x4470 [ 40.844748] [] do_filp_open+0x1a1/0x270 [ 40.850984] [] do_sys_open+0x2f8/0x600 [ 40.857156] [] SyS_open+0x2d/0x40 [ 40.862874] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 40.870068] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 40.875118] [] __lock_acquire+0x37d6/0x4f50 [ 40.881705] [] lock_acquire+0x15e/0x450 [ 40.887949] [] mutex_lock_nested+0xc1/0xb80 [ 40.894536] [] blkdev_reread_part+0x1f/0x40 [ 40.901122] [] loop_reread_partitions+0x7c/0x90 [ 40.908055] [] loop_set_status+0xc02/0x1260 [ 40.914639] [] loop_set_status_compat+0xb2/0x110 [ 40.921657] [] lo_compat_ioctl+0x110/0x140 [ 40.928153] [] compat_blkdev_ioctl+0xca0/0x344f [ 40.935081] [] compat_SyS_ioctl+0x403/0x2210 [ 40.941769] [] do_fast_syscall_32+0x32d/0xa90 [ 40.948529] [] sysenter_flags_fixed+0xd/0x1a [ 40.955201] [ 40.955201] other info that might help us debug this: [ 40.955201] [ 40.963318] Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> loop_ctl_mutex#2 [ 40.972660] Possible unsafe locking scenario: [ 40.972660] [ 40.978698] CPU0 CPU1 [ 40.983336] ---- ---- [ 40.987971] lock(loop_ctl_mutex#2); [ 40.992134] lock(loop_index_mutex); [ 40.998658] lock(loop_ctl_mutex#2); [ 41.005329] lock(&bdev->bd_mutex); [ 41.009248] [ 41.009248] *** DEADLOCK *** [ 41.009248] [ 41.015281] 1 lock held by syz-executor827/2080: [ 41.020015] #0: (loop_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x105/0x140 [ 41.029814] [ 41.029814] stack backtrace: [ 41.034283] CPU: 0 PID: 2080 Comm: syz-executor827 Not tainted 4.4.174+ #17 [ 41.041350] 0000000000000000 41ab7196c9b6105f ffff8801d3daf5e0 ffffffff81aad1a1 [ 41.049367] ffffffff84057a80 ffff8800b6e95f00 ffffffff83aa0cc0 ffffffff83ac6730 [ 41.057351] ffffffff83aa1890 ffff8801d3daf630 ffffffff813abcda ffffffff83e1a280 [ 41.065374] Call Trace: [ 41.067936] [] dump_stack+0xc1/0x120 [ 41.073276] [] print_circular_bug.cold+0x2f7/0x44e [ 41.079844] [] __lock_acquire+0x37d6/0x4f50 [ 41.085789] [] ? trace_hardirqs_on+0x10/0x10 [ 41.091821] [] ? __lock_acquire+0xa4f/0x4f50 [ 41.097851] [] lock_acquire+0x15e/0x450 [ 41.103451] [] ? blkdev_reread_part+0x1f/0x40 [ 41.109572] [] ? blkdev_reread_part+0x1f/0x40 [ 41.115695] [] mutex_lock_nested+0xc1/0xb80 [ 41.121638] [] ? blkdev_reread_part+0x1f/0x40 [ 41.127758] [] ? find_next_bit+0x44/0x50 [ 41.133444] [] ? debug_lockdep_rcu_enabled+0x71/0xa0 [ 41.140178] [] ? mutex_trylock+0x500/0x500 [ 41.146036] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 41.152938] [] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 41.159748] [] blkdev_reread_part+0x1f/0x40 [ 41.165698] [] loop_reread_partitions+0x7c/0x90 [ 41.171999] [] loop_set_status+0xc02/0x1260 [ 41.177943] [] loop_set_status_compat+0xb2/0x110 [ 41.184324] [] ? loop_set_status+0x1260/0x1260 [ 41.190558] [] ? mutex_lock_nested+0x7dd/0xb80 [ 41.196767] [] ? sysenter_flags_fixed+0xd/0x1a [ 41.202974] [] lo_compat_ioctl+0x110/0x140 [ 41.208849] [] ? lo_ioctl+0x1a70/0x1a70 [ 41.214456] [] compat_blkdev_ioctl+0xca0/0x344f [ 41.220752] [] ? cfq_merged_request+0x100/0x100 [ 41.227047] [] ? security_file_ioctl+0x8f/0xc0 [ 41.233255] [] ? cfq_merged_request+0x100/0x100 [ 41.239549] [] compat_SyS_ioctl+0x403/0x2210 [ 41.245580] [] ? compat_SyS_ppoll+0x3d0/0x3d0 [ 41.251701] [] ? putname+0xe0/0x120 [ 41.256952] [] ? compat_SyS_futex+0x1fb/0x2f0 [ 41.263070] [] ? filp_open+0x70/0x70 [ 41.268405] [] ? compat_SyS_get_robust_list+0x310/0x310 [ 41.275392] [] ? __do_page_fault+0x2b3/0x7f0 [ 41.281423] [] ? do