Warning: Permanently added '10.128.0.46' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 55.192540][ T8416] [ 55.195030][ T8416] ====================================================== [ 55.202050][ T8416] WARNING: possible circular locking dependency detected [ 55.209060][ T8416] 5.13.0-rc5-syzkaller #0 Not tainted [ 55.214427][ T8416] ------------------------------------------------------ [ 55.221604][ T8416] syz-executor002/8416 is trying to acquire lock: [ 55.228011][ T8416] ffff888145783a20 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x2ab/0x860 [ 55.236893][ T8416] [ 55.236893][ T8416] but task is already holding lock: [ 55.244255][ T8416] ffffffff8d671668 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x9b/0x770 [ 55.253599][ T8416] [ 55.253599][ T8416] which lock already depends on the new lock. [ 55.253599][ T8416] [ 55.264188][ T8416] [ 55.264188][ T8416] the existing dependency chain (in reverse order) is: [ 55.273315][ T8416] [ 55.273315][ T8416] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 55.281027][ T8416] lock_acquire+0x17f/0x720 [ 55.286054][ T8416] __mutex_lock_common+0x1bf/0x3100 [ 55.291926][ T8416] mutex_lock_killable_nested+0x1a/0x20 [ 55.298019][ T8416] lo_open+0x1c/0x100 [ 55.302606][ T8416] __blkdev_get+0x293/0xa50 [ 55.307766][ T8416] blkdev_get_by_dev+0xf9/0x640 [ 55.313272][ T8416] blkdev_open+0x132/0x2c0 [ 55.318979][ T8416] do_dentry_open+0x7cb/0x1010 [ 55.326412][ T8416] path_openat+0x28e6/0x39b0 [ 55.333563][ T8416] do_filp_open+0x221/0x460 [ 55.339337][ T8416] do_sys_openat2+0x124/0x460 [ 55.344529][ T8416] __x64_sys_open+0x221/0x270 [ 55.349738][ T8416] do_syscall_64+0x3f/0xb0 [ 55.354667][ T8416] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 55.361103][ T8416] [ 55.361103][ T8416] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 55.368742][ T8416] check_prevs_add+0x4f9/0x5b60 [ 55.374121][ T8416] __lock_acquire+0x4307/0x6040 [ 55.379484][ T8416] lock_acquire+0x17f/0x720 [ 55.384694][ T8416] __mutex_lock_common+0x1bf/0x3100 [ 55.390500][ T8416] mutex_lock_nested+0x1a/0x20 [ 55.395795][ T8416] del_gendisk+0x2ab/0x860 [ 55.400738][ T8416] loop_control_ioctl+0x647/0x770 [ 55.406291][ T8416] __se_sys_ioctl+0xfb/0x170 [ 55.411404][ T8416] do_syscall_64+0x3f/0xb0 [ 55.416346][ T8416] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 55.422753][ T8416] [ 55.422753][ T8416] other info that might help us debug this: [ 55.422753][ T8416] [ 55.432970][ T8416] Possible unsafe locking scenario: [ 55.432970][ T8416] [ 55.440420][ T8416] CPU0 CPU1 [ 55.445776][ T8416] ---- ---- [ 55.451234][ T8416] lock(loop_ctl_mutex); [ 55.455582][ T8416] lock(&bdev->bd_mutex); [ 55.462528][ T8416] lock(loop_ctl_mutex); [ 55.469466][ T8416] lock(&bdev->bd_mutex); [ 55.473871][ T8416] [ 55.473871][ T8416] *** DEADLOCK *** [ 55.473871][ T8416] [ 55.482194][ T8416] 1 lock held by syz-executor002/8416: [ 55.487651][ T8416] #0: ffffffff8d671668 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x9b/0x770 [ 55.497855][ T8416] [ 55.497855][ T8416] stack backtrace: [ 55.503832][ T8416] CPU: 0 PID: 8416 Comm: syz-executor002 Not tainted 5.13.0-rc5-syzkaller #0 [ 55.512681][ T8416] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.522750][ T8416] Call Trace: [ 55.526030][ T8416] dump_stack+0x202/0x31e [ 55.530382][ T8416] ? show_regs_print_info+0x12/0x12 [ 55.535573][ T8416] ? log_buf_vmcoreinfo_setup+0x498/0x498 [ 55.541300][ T8416] ? save_trace+0x5a/0x9f0 [ 55.545733][ T8416] print_circular_bug+0xb17/0xdc0 [ 55.550767][ T8416] ? hlock_conflict+0x1f0/0x1f0 [ 55.555621][ T8416] ? __bfs+0x369/0x700 [ 55.559798][ T8416] ? check_path+0x40/0x40 [ 55.564171][ T8416] ? noop_count+0x30/0x30 [ 55.568519][ T8416] ? stack_trace_save+0x1e0/0x1e0 [ 55.573620][ T8416] ? save_trace+0x5a/0x9f0 [ 55.578038][ T8416] check_noncircular+0x2cc/0x390 [ 55.582988][ T8416] ? add_chain_block+0x850/0x850 [ 55.588002][ T8416] ? stack_trace_save+0x104/0x1e0 [ 55.593019][ T8416] check_prevs_add+0x4f9/0x5b60 [ 55.597865][ T8416] ? add_lock_to_list+0x1c7/0x2d0 [ 55.603023][ T8416] ? reacquire_held_locks+0x5f0/0x5f0 [ 55.608406][ T8416] ? lock_release+0x81/0x7b0 [ 55.613005][ T8416] ? __lock_acquire+0x13b0/0x6040 [ 55.619324][ T8416] ? __rcu_read_lock+0x60/0x60 [ 55.624086][ T8416] ? trace_lock_acquire+0x180/0x180 [ 55.629285][ T8416] ? __bfs+0x700/0x700 [ 55.633452][ T8416] ? arch_stack_walk+0x98/0xe0 [ 55.638213][ T8416] ? __bfs+0x700/0x700 [ 55.642298][ T8416] ? stack_trace_save+0x104/0x1e0 [ 55.647424][ T8416] ? stack_trace_snprint+0xe0/0xe0 [ 55.652542][ T8416] ? mark_lock+0x199/0x1eb0 [ 55.657038][ T8416] ? __bfs+0x700/0x700 [ 55.661114][ T8416] ? rcu_lock_release+0x5/0x20 [ 55.666762][ T8416] ? stack_trace_save+0x1e0/0x1e0 [ 55.671969][ T8416] ? rcu_read_lock_sched_held+0x87/0x110 [ 55.677593][ T8416] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 55.683729][ T8416] ? lockdep_lock+0x102/0x2c0 [ 55.688403][ T8416] ? lockdep_count_forward_deps+0x240/0x240 [ 55.694306][ T8416] __lock_acquire+0x4307/0x6040 [ 55.699161][ T8416] ? is_bpf_text_address+0x253/0x270 [ 55.704438][ T8416] ? arch_stack_walk+0x98/0xe0 [ 55.709193][ T8416] ? trace_lock_acquire+0x180/0x180 [ 55.714382][ T8416] ? stack_trace_save+0x104/0x1e0 [ 55.719396][ T8416] ? __bfs+0x700/0x700 [ 55.723564][ T8416] ? kmem_cache_free+0x85/0x170 [ 55.728412][ T8416] ? kasan_set_track+0x54/0x70 [ 55.733168][ T8416] ? kasan_set_track+0x3d/0x70 [ 55.737921][ T8416] ? kasan_set_free_info+0x1f/0x40 [ 55.743109][ T8416] ? ____kasan_slab_free+0x109/0x150 [ 55.748507][ T8416] ? slab_free_freelist_hook+0x1d8/0x290 [ 55.754383][ T8416] ? kmem_cache_free+0x85/0x170 [ 55.759412][ T8416] ? kernfs_put+0x340/0x490 [ 55.763999][ T8416] ? __kernfs_remove+0xd40/0x1020 [ 55.769020][ T8416] ? kernfs_remove_by_name_ns+0x4d/0x90 [ 55.774650][ T8416] ? sysfs_remove_files+0x99/0xf0 [ 55.779871][ T8416] ? del_gendisk+0x289/0x860 [ 55.784455][ T8416] ? loop_control_ioctl+0x647/0x770 [ 55.789661][ T8416] ? rcu_read_lock_sched_held+0x87/0x110 [ 55.795301][ T8416] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 55.801271][ T8416] ? _raw_spin_unlock_irqrestore+0x8b/0x120 [ 55.807166][ T8416] ? lockdep_hardirqs_on+0x8d/0x130 [ 55.812366][ T8416] lock_acquire+0x17f/0x720 [ 55.816861][ T8416] ? del_gendisk+0x2ab/0x860 [ 55.821449][ T8416] ? read_lock_is_recursive+0x10/0x10 [ 55.826812][ T8416] ? rcu_read_lock_sched_held+0x87/0x110 [ 55.832450][ T8416] ? __might_sleep+0x100/0x100 [ 55.837214][ T8416] __mutex_lock_common+0x1bf/0x3100 [ 55.842601][ T8416] ? del_gendisk+0x2ab/0x860 [ 55.847192][ T8416] ? __kernfs_remove+0xf32/0x1020 [ 55.852210][ T8416] ? del_gendisk+0x2ab/0x860 [ 55.856941][ T8416] ? __mutex_unlock_slowpath+0x17b/0x5a0 [ 55.862594][ T8416] ? mutex_lock_io_nested+0x60/0x60 [ 55.867898][ T8416] ? mutex_unlock+0x10/0x10 [ 55.872393][ T8416] ? kernfs_find_ns+0x456/0x4d0 [ 55.877280][ T8416] ? kernfs_remove_by_name_ns+0x86/0x90 [ 55.883327][ T8416] mutex_lock_nested+0x1a/0x20 [ 55.888179][ T8416] del_gendisk+0x2ab/0x860 [ 55.892591][ T8416] loop_control_ioctl+0x647/0x770 [ 55.897634][ T8416] ? xor_init+0x60/0x60 [ 55.901790][ T8416] ? print_irqtrace_events+0x220/0x220 [ 55.907242][ T8416] ? vtime_user_exit+0x2b2/0x3e0 [ 55.912210][ T8416] ? bpf_lsm_file_ioctl+0x5/0x10 [ 55.917396][ T8416] ? security_file_ioctl+0x9d/0xb0 [ 55.923210][ T8416] ? xor_init+0x60/0x60 [ 55.927361][ T8416] __se_sys_ioctl+0xfb/0x170 [ 55.932192][ T8416] do_syscall_64+0x3f/0xb0 [ 55.936719][ T8416] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 55.942600][ T8416] RIP: 0033:0x43ee69 [ 55.946570][ T8416] 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 [ 55.966526][ T8416] RSP: 002b:00007ffc24f2c378 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 55.974958][ T8416] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee69 [ 55.982921][ T8416] RDX: 9999999999999999 RSI: 0000000000004c81 RDI: 0000000000000003 [ 55.990882][ T8416] RBP: 0000000000402e50 R08: 0000000000000000 R09: 0000000000400488 [ 55.999121][ T8416] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ee0 [ 56.007093][ T8416] R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488