Warning: Permanently added '10.128.1.109' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 50.919041][ T8403] [ 50.921592][ T8403] ====================================================== [ 50.928597][ T8403] WARNING: possible circular locking dependency detected [ 50.935597][ T8403] 5.13.0-rc5-syzkaller #0 Not tainted [ 50.940985][ T8403] ------------------------------------------------------ [ 50.948024][ T8403] syz-executor708/8403 is trying to acquire lock: [ 50.954522][ T8403] ffff88814572c5a0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x2ab/0x860 [ 50.963375][ T8403] [ 50.963375][ T8403] but task is already holding lock: [ 50.970727][ T8403] ffffffff8d671668 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x9b/0x770 [ 50.980115][ T8403] [ 50.980115][ T8403] which lock already depends on the new lock. [ 50.980115][ T8403] [ 50.990507][ T8403] [ 50.990507][ T8403] the existing dependency chain (in reverse order) is: [ 50.999595][ T8403] [ 50.999595][ T8403] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 51.007338][ T8403] lock_acquire+0x17f/0x720 [ 51.012366][ T8403] __mutex_lock_common+0x1bf/0x3100 [ 51.018433][ T8403] mutex_lock_killable_nested+0x1a/0x20 [ 51.024488][ T8403] lo_open+0x1c/0x100 [ 51.028969][ T8403] __blkdev_get+0x293/0xa50 [ 51.033987][ T8403] blkdev_get_by_dev+0xf9/0x640 [ 51.039347][ T8403] blkdev_open+0x132/0x2c0 [ 51.044261][ T8403] do_dentry_open+0x7cb/0x1010 [ 51.049536][ T8403] path_openat+0x28e6/0x39b0 [ 51.054624][ T8403] do_filp_open+0x221/0x460 [ 51.059622][ T8403] do_sys_openat2+0x124/0x460 [ 51.064888][ T8403] __x64_sys_open+0x221/0x270 [ 51.070060][ T8403] do_syscall_64+0x3f/0xb0 [ 51.075232][ T8403] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 51.081624][ T8403] [ 51.081624][ T8403] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 51.089328][ T8403] check_prevs_add+0x4f9/0x5b60 [ 51.094680][ T8403] __lock_acquire+0x4307/0x6040 [ 51.100044][ T8403] lock_acquire+0x17f/0x720 [ 51.105082][ T8403] __mutex_lock_common+0x1bf/0x3100 [ 51.110804][ T8403] mutex_lock_nested+0x1a/0x20 [ 51.116081][ T8403] del_gendisk+0x2ab/0x860 [ 51.121019][ T8403] loop_control_ioctl+0x647/0x770 [ 51.126563][ T8403] __se_sys_ioctl+0xfb/0x170 [ 51.131654][ T8403] do_syscall_64+0x3f/0xb0 [ 51.136575][ T8403] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 51.143062][ T8403] [ 51.143062][ T8403] other info that might help us debug this: [ 51.143062][ T8403] [ 51.153265][ T8403] Possible unsafe locking scenario: [ 51.153265][ T8403] [ 51.160791][ T8403] CPU0 CPU1 [ 51.166132][ T8403] ---- ---- [ 51.171663][ T8403] lock(loop_ctl_mutex); [ 51.175976][ T8403] lock(&bdev->bd_mutex); [ 51.182973][ T8403] lock(loop_ctl_mutex); [ 51.189796][ T8403] lock(&bdev->bd_mutex); [ 51.194367][ T8403] [ 51.194367][ T8403] *** DEADLOCK *** [ 51.194367][ T8403] [ 51.202487][ T8403] 1 lock held by syz-executor708/8403: [ 51.207921][ T8403] #0: ffffffff8d671668 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x9b/0x770 [ 51.217635][ T8403] [ 51.217635][ T8403] stack backtrace: [ 51.223510][ T8403] CPU: 1 PID: 8403 Comm: syz-executor708 Not tainted 5.13.0-rc5-syzkaller #0 [ 51.232246][ T8403] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.242434][ T8403] Call Trace: [ 51.247968][ T8403] dump_stack+0x202/0x31e [ 51.252629][ T8403] ? show_regs_print_info+0x12/0x12 [ 51.257806][ T8403] ? log_buf_vmcoreinfo_setup+0x498/0x498 [ 51.263507][ T8403] ? save_trace+0x5a/0x9f0 [ 51.267906][ T8403] print_circular_bug+0xb17/0xdc0 [ 51.272926][ T8403] ? hlock_conflict+0x1f0/0x1f0 [ 51.277874][ T8403] ? __bfs+0x369/0x700 [ 51.281929][ T8403] ? check_path+0x40/0x40 [ 51.286246][ T8403] ? noop_count+0x30/0x30 [ 51.290570][ T8403] ? stack_trace_save+0x1e0/0x1e0 [ 51.295577][ T8403] ? save_trace+0x5a/0x9f0 [ 51.299975][ T8403] check_noncircular+0x2cc/0x390 [ 51.304987][ T8403] ? add_chain_block+0x850/0x850 [ 51.310119][ T8403] ? stack_trace_save+0x104/0x1e0 [ 51.315174][ T8403] check_prevs_add+0x4f9/0x5b60 [ 51.320208][ T8403] ? add_lock_to_list+0x1c7/0x2d0 [ 51.325235][ T8403] ? reacquire_held_locks+0x5f0/0x5f0 [ 51.330588][ T8403] ? lock_release+0x81/0x7b0 [ 51.335174][ T8403] ? __lock_acquire+0x13b0/0x6040 [ 51.340175][ T8403] ? __rcu_read_lock+0x60/0x60 [ 51.344934][ T8403] ? trace_lock_acquire+0x180/0x180 [ 51.350117][ T8403] ? __bfs+0x700/0x700 [ 51.354251][ T8403] ? arch_stack_walk+0x98/0xe0 [ 51.359168][ T8403] ? __bfs+0x700/0x700 [ 51.363216][ T8403] ? stack_trace_save+0x104/0x1e0 [ 51.368218][ T8403] ? stack_trace_snprint+0xe0/0xe0 [ 51.373310][ T8403] ? mark_lock+0x199/0x1eb0 [ 51.377810][ T8403] ? __bfs+0x700/0x700 [ 51.381882][ T8403] ? rcu_lock_release+0x5/0x20 [ 51.386631][ T8403] ? stack_trace_save+0x1e0/0x1e0 [ 51.391634][ T8403] ? rcu_read_lock_sched_held+0x87/0x110 [ 51.397249][ T8403] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 51.403211][ T8403] ? lockdep_lock+0x102/0x2c0 [ 51.407868][ T8403] ? lockdep_count_forward_deps+0x240/0x240 [ 51.413741][ T8403] __lock_acquire+0x4307/0x6040 [ 51.418572][ T8403] ? is_bpf_text_address+0x253/0x270 [ 51.423848][ T8403] ? arch_stack_walk+0x98/0xe0 [ 51.428590][ T8403] ? trace_lock_acquire+0x180/0x180 [ 51.433781][ T8403] ? stack_trace_save+0x104/0x1e0 [ 51.438828][ T8403] ? __bfs+0x700/0x700 [ 51.442878][ T8403] ? kmem_cache_free+0x85/0x170 [ 51.447708][ T8403] ? kasan_set_track+0x54/0x70 [ 51.452450][ T8403] ? kasan_set_track+0x3d/0x70 [ 51.457188][ T8403] ? kasan_set_free_info+0x1f/0x40 [ 51.462281][ T8403] ? ____kasan_slab_free+0x109/0x150 [ 51.467554][ T8403] ? slab_free_freelist_hook+0x1d8/0x290 [ 51.473162][ T8403] ? kmem_cache_free+0x85/0x170 [ 51.478000][ T8403] ? kernfs_put+0x340/0x490 [ 51.482490][ T8403] ? __kernfs_remove+0xd40/0x1020 [ 51.487492][ T8403] ? kernfs_remove_by_name_ns+0x4d/0x90 [ 51.493014][ T8403] ? sysfs_remove_files+0x99/0xf0 [ 51.498025][ T8403] ? del_gendisk+0x289/0x860 [ 51.502602][ T8403] ? loop_control_ioctl+0x647/0x770 [ 51.507801][ T8403] ? rcu_read_lock_sched_held+0x87/0x110 [ 51.513429][ T8403] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 51.519409][ T8403] ? _raw_spin_unlock_irqrestore+0x8b/0x120 [ 51.525614][ T8403] ? lockdep_hardirqs_on+0x8d/0x130 [ 51.530795][ T8403] lock_acquire+0x17f/0x720 [ 51.535374][ T8403] ? del_gendisk+0x2ab/0x860 [ 51.539952][ T8403] ? read_lock_is_recursive+0x10/0x10 [ 51.545394][ T8403] ? rcu_read_lock_sched_held+0x87/0x110 [ 51.551180][ T8403] ? __might_sleep+0x100/0x100 [ 51.555926][ T8403] __mutex_lock_common+0x1bf/0x3100 [ 51.561190][ T8403] ? del_gendisk+0x2ab/0x860 [ 51.565848][ T8403] ? __kernfs_remove+0xf32/0x1020 [ 51.571464][ T8403] ? del_gendisk+0x2ab/0x860 [ 51.576033][ T8403] ? __mutex_unlock_slowpath+0x17b/0x5a0 [ 51.581651][ T8403] ? mutex_lock_io_nested+0x60/0x60 [ 51.587617][ T8403] ? mutex_unlock+0x10/0x10 [ 51.592473][ T8403] ? kernfs_find_ns+0x456/0x4d0 [ 51.598357][ T8403] ? kernfs_remove_by_name_ns+0x86/0x90 [ 51.603902][ T8403] mutex_lock_nested+0x1a/0x20 [ 51.609013][ T8403] del_gendisk+0x2ab/0x860 [ 51.613422][ T8403] loop_control_ioctl+0x647/0x770 [ 51.618436][ T8403] ? xor_init+0x60/0x60 [ 51.622574][ T8403] ? print_irqtrace_events+0x220/0x220 [ 51.628118][ T8403] ? vtime_user_exit+0x2b2/0x3e0 [ 51.633210][ T8403] ? bpf_lsm_file_ioctl+0x5/0x10 [ 51.638132][ T8403] ? security_file_ioctl+0x9d/0xb0 [ 51.643314][ T8403] ? xor_init+0x60/0x60 [ 51.647506][ T8403] __se_sys_ioctl+0xfb/0x170 [ 51.652078][ T8403] do_syscall_64+0x3f/0xb0 [ 51.656478][ T8403] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 51.662351][ T8403] RIP: 0033:0x43ee49 [ 51.666314][ T8403] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 51.685988][ T8403] RSP: 002b:00007ffd041439f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 51.694425][ T8403] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee49 [ 51.702381][ T8403] RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 [ 51.710346][ T8403] RBP: 0000000000402e30 R08: 0000000000000000 R09: 0000000000400488 [ 51.718503][ T8403] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ec0 [ 51.726576][ T8403] R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488