[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 9.799383] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 35.929550] random: crng init done Warning: Permanently added '10.128.0.49' (ECDSA) to the list of known hosts. executing program executing program [ 61.688081] [ 61.689718] ====================================================== [ 61.696007] [ INFO: possible circular locking dependency detected ] [ 61.702387] 4.9.133+ #8 Not tainted [ 61.706021] ------------------------------------------------------- [ 61.713467] syz-executor943/2083 is trying to acquire lock: [ 61.719152] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 61.728156] but task is already holding lock: [ 61.732797] (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x103/0x140 [ 61.742181] which lock already depends on the new lock. [ 61.742181] [ 61.749209] [ 61.749209] the existing dependency chain (in reverse order) is: [ 61.756810] -> #2 (&lo->lo_ctl_mutex#2){+.+...}: [ 61.762317] lock_acquire+0x130/0x3e0 [ 61.766614] mutex_lock_nested+0xc0/0x900 [ 61.771254] lo_release+0x85/0x1a0 [ 61.775330] __blkdev_put+0x636/0x840 [ 61.779634] blkdev_put+0x85/0x560 [ 61.783670] blkdev_close+0x8b/0xb0 [ 61.787794] __fput+0x263/0x700 [ 61.791568] ____fput+0x15/0x20 [ 61.795342] task_work_run+0x10c/0x180 [ 61.799728] exit_to_usermode_loop+0x129/0x150 [ 61.804811] do_syscall_64+0x3e2/0x550 [ 61.809209] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 61.814806] -> #1 (loop_index_mutex){+.+.+.}: [ 61.819979] lock_acquire+0x130/0x3e0 [ 61.824279] mutex_lock_nested+0xc0/0x900 [ 61.828921] lo_open+0x1b/0xa0 [ 61.832610] __blkdev_get+0x263/0xd60 [ 61.836905] blkdev_get+0x2da/0x920 [ 61.841030] blkdev_open+0x1a5/0x250 [ 61.845245] do_dentry_open+0x3ef/0xc90 [ 61.849715] vfs_open+0x11c/0x210 [ 61.853669] path_openat+0x542/0x2790 [ 61.857961] do_filp_open+0x197/0x270 [ 61.862257] do_sys_open+0x30d/0x5c0 [ 61.866472] SyS_open+0x2d/0x40 [ 61.870250] do_syscall_64+0x19f/0x550 [ 61.874638] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 61.880238] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 61.885336] __lock_acquire+0x3189/0x4a10 [ 61.889982] lock_acquire+0x130/0x3e0 [ 61.894283] mutex_lock_nested+0xc0/0x900 [ 61.898977] blkdev_reread_part+0x1e/0x40 [ 61.903630] loop_reread_partitions+0x7c/0x90 [ 61.908620] loop_set_status+0xa7e/0xfe0 [ 61.913176] loop_set_status_compat+0x9a/0xf0 [ 61.918167] lo_compat_ioctl+0x10e/0x140 [ 61.922725] compat_blkdev_ioctl+0x3a4/0x3630 [ 61.927712] compat_SyS_ioctl+0x12d/0x1fd0 [ 61.932449] do_fast_syscall_32+0x2f1/0xa10 [ 61.937273] entry_SYSENTER_compat+0x90/0xa2 [ 61.942174] [ 61.942174] other info that might help us debug this: [ 61.942174] [ 61.950288] Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 [ 61.959860] Possible unsafe locking scenario: [ 61.959860] [ 61.965888] CPU0 CPU1 [ 61.970529] ---- ---- [ 61.975166] lock(&lo->lo_ctl_mutex#2); [ 61.979555] lock(loop_index_mutex); [ 61.986085] lock(&lo->lo_ctl_mutex#2); [ 61.993003] lock(&bdev->bd_mutex); [ 61.996961] [ 61.996961] *** DEADLOCK *** [ 61.996961] [ 62.003078] 1 lock held by syz-executor943/2083: [ 62.007809] #0: (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x103/0x140 [ 62.017751] [ 62.017751] stack backtrace: [ 62.022220] CPU: 0 PID: 2083 Comm: syz-executor943 Not tainted 4.9.133+ #8 [ 62.029203] ffff8801cdb7f788 ffffffff81b37069 ffffffff83c8e360 ffffffff83cb42e0 [ 62.037260] ffffffff83c8d5e0 ffff8801ce85d010 ffff8801ce85c740 ffff8801cdb7f7d0 [ 62.045257] ffffffff813feab5 0000000000000001 00000000ce85cff0 0000000000000001 [ 62.053236] Call Trace: [ 62.055881] [] dump_stack+0xc1/0x128 [ 62.061309] [] print_circular_bug.cold.36+0x2f7/0x432 [ 62.068176] [] __lock_acquire+0x3189/0x4a10 [ 62.074133] [] ? trace_hardirqs_on+0x10/0x10 [ 62.080169] [] ? __lock_acquire+0x654/0x4a10 [ 62.086201] [] lock_acquire+0x130/0x3e0 [ 62.091806] [] ? blkdev_reread_part+0x1e/0x40 [ 62.097989] [] ? blkdev_reread_part+0x1e/0x40 [ 62.104118] [] mutex_lock_nested+0xc0/0x900 [ 62.110065] [] ? blkdev_reread_part+0x1e/0x40 [ 62.116184] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 62.122912] [] ? mutex_trylock+0x3e0/0x3e0 [ 62.128771] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 62.135676] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 62.142504] [] blkdev_reread_part+0x1e/0x40 [ 62.148460] [] loop_reread_partitions+0x7c/0x90 [ 62.154759] [] loop_set_status+0xa7e/0xfe0 [ 62.160616] [] loop_set_status_compat+0x9a/0xf0 [ 62.166912] [] ? loop_set_status+0xfe0/0xfe0 [ 62.172950] [] lo_compat_ioctl+0x10e/0x140 [ 62.178815] [] ? lo_ioctl+0x1910/0x1910 [ 62.184416] [] compat_blkdev_ioctl+0x3a4/0x3630 [ 62.190713] [] ? putname+0xe0/0x110 [ 62.195966] [] ? cfq_merged_request+0x110/0x110 [ 62.202267] [] ? do_sys_open+0x224/0x5c0 [ 62.208006] [] ? filp_open+0x70/0x70 [ 62.213368] [] ? security_file_ioctl+0x8f/0xc0 [ 62.219575] [] ? cfq_merged_request+0x110/0x110 [ 62.225870] [] compat_SyS_ioctl+0x12d/0x1fd0 [ 62.231905] [] ? do_ioctl+0x60/0x60 executing program [ 62.237157] [] do_fast_syscall_32+0x2f1/0xa10 [ 62.243278] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 62.250020] [] entry_SYSENTER_compat+0x90/0xa2 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program