Warning: Permanently added '10.128.10.27' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 36.363234] [ 36.364884] ====================================================== [ 36.371178] WARNING: possible circular locking dependency detected [ 36.377490] 4.20.0-rc4+ #262 Not tainted [ 36.381527] ------------------------------------------------------ [ 36.387837] syz-executor305/5987 is trying to acquire lock: [ 36.393526] 00000000fdaaba35 (&bdev->bd_mutex){+.+.}, at: blkdev_reread_part+0x1e/0x40 [ 36.401585] [ 36.401585] but task is already holding lock: [ 36.407547] 0000000035dbc3dd (&lo->lo_ctl_mutex#2){+.+.}, at: lo_compat_ioctl+0x11b/0x170 [ 36.415849] [ 36.415849] which lock already depends on the new lock. [ 36.415849] [ 36.424500] [ 36.424500] the existing dependency chain (in reverse order) is: [ 36.432115] [ 36.432115] -> #2 (&lo->lo_ctl_mutex#2){+.+.}: [ 36.438181] __mutex_lock+0x166/0x16f0 [ 36.442573] mutex_lock_nested+0x16/0x20 [ 36.447136] lo_release+0xa3/0x1f0 [ 36.451181] __blkdev_put+0x4f6/0x830 [ 36.455491] blkdev_put+0x98/0x540 [ 36.459530] blkdev_close+0x8b/0xb0 [ 36.463659] __fput+0x385/0xa30 [ 36.467437] ____fput+0x15/0x20 [ 36.471220] task_work_run+0x1e8/0x2a0 [ 36.475607] exit_to_usermode_loop+0x318/0x380 [ 36.480687] do_syscall_64+0x6be/0x820 [ 36.485080] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.490766] [ 36.490766] -> #1 (loop_index_mutex){+.+.}: [ 36.496562] __mutex_lock+0x166/0x16f0 [ 36.500949] mutex_lock_nested+0x16/0x20 [ 36.505520] lo_open+0x1b/0xb0 [ 36.509211] __blkdev_get+0x360/0x13c0 [ 36.513599] blkdev_get+0xc1/0xb50 [ 36.517639] blkdev_open+0x1fb/0x280 [ 36.521853] do_dentry_open+0x499/0x1250 [ 36.526500] vfs_open+0xa0/0xd0 [ 36.530282] path_openat+0x12bc/0x5150 [ 36.534690] do_filp_open+0x255/0x380 [ 36.538994] do_sys_open+0x568/0x700 [ 36.543208] __x64_sys_open+0x7e/0xc0 [ 36.547520] do_syscall_64+0x1b9/0x820 [ 36.551911] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.557599] [ 36.557599] -> #0 (&bdev->bd_mutex){+.+.}: [ 36.563324] lock_acquire+0x1ed/0x520 [ 36.567625] __mutex_lock+0x166/0x16f0 [ 36.572010] mutex_lock_nested+0x16/0x20 [ 36.576575] blkdev_reread_part+0x1e/0x40 [ 36.581236] loop_reread_partitions+0x163/0x190 [ 36.586406] loop_set_status+0xb95/0x1010 [ 36.591429] loop_set_status_compat+0xa4/0xf0 [ 36.596429] lo_compat_ioctl+0x13a/0x170 [ 36.600995] compat_blkdev_ioctl+0x3ca/0x1b30 [ 36.606003] __ia32_compat_sys_ioctl+0x20e/0x630 [ 36.611264] do_fast_syscall_32+0x34d/0xfb2 [ 36.616090] entry_SYSENTER_compat+0x70/0x7f [ 36.620996] [ 36.620996] other info that might help us debug this: [ 36.620996] [ 36.629118] Chain exists of: [ 36.629118] &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 [ 36.629118] [ 36.640461] Possible unsafe locking scenario: [ 36.640461] [ 36.646526] CPU0 CPU1 [ 36.651169] ---- ---- [ 36.655814] lock(&lo->lo_ctl_mutex#2); [ 36.659852] lock(loop_index_mutex); [ 36.666158] lock(&lo->lo_ctl_mutex#2); [ 36.672716] lock(&bdev->bd_mutex); [ 36.676405] [ 36.676405] *** DEADLOCK *** [ 36.676405] [ 36.682444] 1 lock held by syz-executor305/5987: [ 36.687178] #0: 0000000035dbc3dd (&lo->lo_ctl_mutex#2){+.+.}, at: lo_compat_ioctl+0x11b/0x170 [ 36.695919] [ 36.695919] stack backtrace: [ 36.700405] CPU: 0 PID: 5987 Comm: syz-executor305 Not tainted 4.20.0-rc4+ #262 [ 36.707828] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.717246] Call Trace: [ 36.719822] dump_stack+0x244/0x39d [ 36.723435] ? dump_stack_print_info.cold.1+0x20/0x20 [ 36.728605] ? vprintk_func+0x85/0x181 [ 36.732477] print_circular_bug.isra.35.cold.54+0x1bd/0x27d [ 36.738178] ? save_trace+0xe0/0x290 [ 36.741885] __lock_acquire+0x3399/0x4c20 [ 36.746030] ? mark_held_locks+0x130/0x130 [ 36.750245] ? print_bfs_bug+0x80/0x80 [ 36.754140] ? mark_held_locks+0x130/0x130 [ 36.758373] ? __sanitizer_cov_trace_cmp4+0x16/0x20 [ 36.763372] ? bpf_prog_kallsyms_find+0xde/0x4a0 [ 36.768110] ? __bpf_trace_xdp_cpumap_enqueue+0x40/0x40 [ 36.773457] ? is_bpf_text_address+0xac/0x170 [ 36.777948] ? lock_downgrade+0x900/0x900 [ 36.782089] ? rcu_read_unlock_special+0x1c0/0x1c0 [ 36.787002] ? print_usage_bug+0xc0/0xc0 [ 36.791046] ? kasan_check_read+0x11/0x20 [ 36.795177] ? print_usage_bug+0xc0/0xc0 [ 36.799218] ? print_usage_bug+0xc0/0xc0 [ 36.803271] ? zap_class+0x640/0x640 [ 36.806987] ? is_bpf_text_address+0xd3/0x170 [ 36.811462] ? __lock_acquire+0x62f/0x4c20 [ 36.815679] lock_acquire+0x1ed/0x520 [ 36.819461] ? blkdev_reread_part+0x1e/0x40 [ 36.823766] ? lock_release+0xa00/0xa00 [ 36.827720] ? perf_trace_sched_process_exec+0x860/0x860 [ 36.833161] ? mark_held_locks+0x130/0x130 [ 36.837382] ? blkdev_reread_part+0x1e/0x40 [ 36.841689] __mutex_lock+0x166/0x16f0 [ 36.845559] ? blkdev_reread_part+0x1e/0x40 [ 36.849878] ? mark_held_locks+0x130/0x130 [ 36.854109] ? mark_held_locks+0xc7/0x130 [ 36.858237] ? blkdev_reread_part+0x1e/0x40 [ 36.862539] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 36.867622] ? mutex_trylock+0x2b0/0x2b0 [ 36.871664] ? trace_hardirqs_on+0xbd/0x310 [ 36.875967] ? kasan_check_read+0x11/0x20 [ 36.880099] ? finish_wait+0x25d/0x430 [ 36.883967] ? trace_hardirqs_off_caller+0x310/0x310 [ 36.889051] ? zap_class+0x640/0x640 [ 36.892756] ? zap_class+0x640/0x640 [ 36.896451] ? print_usage_bug+0xc0/0xc0 [ 36.900489] ? zap_class+0x640/0x640 [ 36.904192] ? print_usage_bug+0xc0/0xc0 [ 36.908252] ? _raw_spin_unlock_irqrestore+0x6d/0xd0 [ 36.914913] ? find_held_lock+0x36/0x1c0 [ 36.918956] ? mark_held_locks+0xc7/0x130 [ 36.923086] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 36.928168] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 36.933254] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 36.937827] ? trace_hardirqs_on+0xbd/0x310 [ 36.942139] ? kasan_check_read+0x11/0x20 [ 36.946282] ? __wake_up_common_lock+0x1d0/0x330 [ 36.951022] ? trace_hardirqs_off_caller+0x310/0x310 [ 36.956108] ? percpu_ref_resurrect+0x2f0/0x4b0 [ 36.960761] ? trace_hardirqs_off_caller+0x310/0x310 [ 36.965846] ? _raw_spin_unlock_irqrestore+0x6d/0xd0 [ 36.970929] ? __wake_up_common_lock+0x1d0/0x330 [ 36.975666] mutex_lock_nested+0x16/0x20 [ 36.979708] ? mutex_lock_nested+0x16/0x20 [ 36.983937] blkdev_reread_part+0x1e/0x40 [ 36.988077] loop_reread_partitions+0x163/0x190 [ 36.992728] ? __loop_update_dio+0x6b0/0x6b0 [ 36.997118] loop_set_status+0xb95/0x1010 [ 37.001249] loop_set_status_compat+0xa4/0xf0 [ 37.005735] ? loop_set_status+0x1010/0x1010 [ 37.010155] lo_compat_ioctl+0x13a/0x170 [ 37.014202] ? lo_ioctl+0x1d60/0x1d60 [ 37.017987] compat_blkdev_ioctl+0x3ca/0x1b30 [ 37.022468] ? bfq_create_group_hierarchy+0x120/0x120 [ 37.027637] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 37.032203] ? bfq_create_group_hierarchy+0x120/0x120 [ 37.037374] __ia32_compat_sys_ioctl+0x20e/0x630 [ 37.042132] do_fast_syscall_32+0x34d/0xfb2 [ 37.046439] ? do_int80_syscall_32+0x890/0x890 [ 37.051005] ? entry_SYSENTER_compat+0x68/0x7f [ 37.055569] ? trace_hardirqs_off_caller+0xbb/0x310 [ 37.060568] ? syscall_return_slowpath+0x5e0/0x5e0 [ 37.065479] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.070301] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.075127] ? trace_hardirqs_on_caller+0x310/0x310 [ 37.080138] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 37.085137] ? prepare_exit_to_usermode+0x291/0x3b0 [ 37.090145] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.095058] entry_SYSENTER_compat+0x70/0x7f [ 37.099447] RIP: 0023:0xf7f5aa29 [ 37.102796] Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 [ 37.121675] RSP: 002b:00000000ff9014bc EFLAGS: 00000217 ORIG_RAX: 0000000000000036 [ 37.129375] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000004c02 [ 37.136624] RDX: 0000000020000300 RSI: 0000000000000036 RDI: 0000000000000003 [ 37.143876] RBP: 0000000000004c00 R08: 0000000000000000 R09: 0000000000000000 [ 37.151138] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 37.158387] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000