Warning: Permanently added '10.128.1.218' (ED25519) to the list of known hosts. executing program [ 52.970459][ T3564] [ 52.972818][ T3564] ====================================================== [ 52.980439][ T3564] WARNING: possible circular locking dependency detected [ 52.987464][ T3564] 5.15.164-syzkaller #0 Not tainted [ 52.992646][ T3564] ------------------------------------------------------ [ 52.999647][ T3564] syz-executor127/3564 is trying to acquire lock: [ 53.006042][ T3564] ffff888079cfcb98 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: __flush_work+0xcf/0x1a0 [ 53.016507][ T3564] [ 53.016507][ T3564] but task is already holding lock: [ 53.023871][ T3564] ffff888079cfcff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 [ 53.033201][ T3564] [ 53.033201][ T3564] which lock already depends on the new lock. [ 53.033201][ T3564] [ 53.043592][ T3564] [ 53.043592][ T3564] the existing dependency chain (in reverse order) is: [ 53.052605][ T3564] [ 53.052605][ T3564] -> #3 (&hdev->req_lock){+.+.}-{3:3}: [ 53.060236][ T3564] lock_acquire+0x1db/0x4f0 [ 53.065253][ T3564] __mutex_lock_common+0x1da/0x25a0 [ 53.070987][ T3564] mutex_lock_nested+0x17/0x20 [ 53.076255][ T3564] hci_dev_do_close+0x63/0x1070 [ 53.081612][ T3564] hci_rfkill_set_block+0x114/0x1a0 [ 53.087321][ T3564] rfkill_set_block+0x1e7/0x430 [ 53.092682][ T3564] rfkill_fop_write+0x5b7/0x790 [ 53.098468][ T3564] vfs_write+0x30c/0xe50 [ 53.103824][ T3564] ksys_write+0x1a2/0x2c0 [ 53.108783][ T3564] do_syscall_64+0x3b/0xb0 [ 53.114020][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 53.120447][ T3564] [ 53.120447][ T3564] -> #2 (rfkill_global_mutex){+.+.}-{3:3}: [ 53.128430][ T3564] lock_acquire+0x1db/0x4f0 [ 53.133455][ T3564] __mutex_lock_common+0x1da/0x25a0 [ 53.139170][ T3564] mutex_lock_nested+0x17/0x20 [ 53.144443][ T3564] rfkill_register+0x30/0x880 [ 53.149633][ T3564] hci_register_dev+0x4dd/0xa50 [ 53.154995][ T3564] vhci_create_device+0x310/0x590 [ 53.160560][ T3564] vhci_write+0x382/0x430 [ 53.165410][ T3564] vfs_write+0xacd/0xe50 [ 53.170179][ T3564] ksys_write+0x1a2/0x2c0 [ 53.175011][ T3564] do_syscall_64+0x3b/0xb0 [ 53.180108][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 53.186507][ T3564] [ 53.186507][ T3564] -> #1 (&data->open_mutex){+.+.}-{3:3}: [ 53.194322][ T3564] lock_acquire+0x1db/0x4f0 [ 53.199331][ T3564] __mutex_lock_common+0x1da/0x25a0 [ 53.205816][ T3564] mutex_lock_nested+0x17/0x20 [ 53.211099][ T3564] vhci_send_frame+0x8a/0xf0 [ 53.216194][ T3564] hci_send_frame+0x1af/0x2f0 [ 53.221390][ T3564] hci_tx_work+0xb0b/0x19d0 [ 53.226413][ T3564] process_one_work+0x8a1/0x10c0 [ 53.231866][ T3564] worker_thread+0xaca/0x1280 [ 53.237061][ T3564] kthread+0x3f6/0x4f0 [ 53.241649][ T3564] ret_from_fork+0x1f/0x30 [ 53.246578][ T3564] [ 53.246578][ T3564] -> #0 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}: [ 53.255772][ T3564] validate_chain+0x1649/0x5930 [ 53.261147][ T3564] __lock_acquire+0x1295/0x1ff0 [ 53.266503][ T3564] lock_acquire+0x1db/0x4f0 [ 53.271514][ T3564] __flush_work+0xeb/0x1a0 [ 53.276438][ T3564] hci_dev_do_close+0x20a/0x1070 [ 53.281886][ T3564] hci_rfkill_set_block+0x114/0x1a0 [ 53.287590][ T3564] rfkill_set_block+0x1e7/0x430 [ 53.292953][ T3564] rfkill_fop_write+0x5b7/0x790 [ 53.298322][ T3564] vfs_write+0x30c/0xe50 [ 53.303098][ T3564] ksys_write+0x1a2/0x2c0 [ 53.307965][ T3564] do_syscall_64+0x3b/0xb0 [ 53.312889][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 53.319293][ T3564] [ 53.319293][ T3564] other info that might help us debug this: [ 53.319293][ T3564] [ 53.329504][ T3564] Chain exists of: [ 53.329504][ T3564] (work_completion)(&hdev->tx_work) --> rfkill_global_mutex --> &hdev->req_lock [ 53.329504][ T3564] [ 53.345034][ T3564] Possible unsafe locking scenario: [ 53.345034][ T3564] [ 53.352747][ T3564] CPU0 CPU1 [ 53.358353][ T3564] ---- ---- [ 53.363707][ T3564] lock(&hdev->req_lock); [ 53.368120][ T3564] lock(rfkill_global_mutex); [ 53.375400][ T3564] lock(&hdev->req_lock); [ 53.382332][ T3564] lock((work_completion)(&hdev->tx_work)); [ 53.388421][ T3564] [ 53.388421][ T3564] *** DEADLOCK *** [ 53.388421][ T3564] [ 53.396571][ T3564] 2 locks held by syz-executor127/3564: [ 53.402192][ T3564] #0: ffffffff8dcbcc48 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0x1a5/0x790 [ 53.412649][ T3564] #1: ffff888079cfcff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 [ 53.422502][ T3564] [ 53.422502][ T3564] stack backtrace: [ 53.428467][ T3564] CPU: 0 PID: 3564 Comm: syz-executor127 Not tainted 5.15.164-syzkaller #0 [ 53.437037][ T3564] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 [ 53.447081][ T3564] Call Trace: [ 53.450350][ T3564] [ 53.453292][ T3564] dump_stack_lvl+0x1e3/0x2d0 [ 53.457966][ T3564] ? io_uring_drop_tctx_refs+0x1a0/0x1a0 [ 53.463593][ T3564] ? print_circular_bug+0x12b/0x1a0 [ 53.468780][ T3564] check_noncircular+0x2f8/0x3b0 [ 53.473706][ T3564] ? add_chain_block+0x850/0x850 [ 53.478626][ T3564] ? lockdep_lock+0x11f/0x2a0 [ 53.483284][ T3564] ? stack_trace_save+0x113/0x1c0 [ 53.488296][ T3564] validate_chain+0x1649/0x5930 [ 53.493138][ T3564] ? reacquire_held_locks+0x660/0x660 [ 53.498492][ T3564] ? validate_chain+0x13bd/0x5930 [ 53.503502][ T3564] ? look_up_lock_class+0x77/0x120 [ 53.508600][ T3564] ? register_lock_class+0x100/0x9a0 [ 53.513868][ T3564] ? is_dynamic_key+0x1f0/0x1f0 [ 53.518699][ T3564] ? mark_lock+0x98/0x340 [ 53.523010][ T3564] __lock_acquire+0x1295/0x1ff0 [ 53.527852][ T3564] lock_acquire+0x1db/0x4f0 [ 53.532341][ T3564] ? __flush_work+0xcf/0x1a0 [ 53.536914][ T3564] ? read_lock_is_recursive+0x10/0x10 [ 53.542302][ T3564] ? mark_lock+0x98/0x340 [ 53.546624][ T3564] __flush_work+0xeb/0x1a0 [ 53.551022][ T3564] ? __flush_work+0xcf/0x1a0 [ 53.555598][ T3564] ? flush_work+0x20/0x20 [ 53.559917][ T3564] ? _raw_read_unlock_irqrestore+0xd9/0x130 [ 53.565795][ T3564] ? _raw_read_unlock+0x40/0x40 [ 53.570633][ T3564] ? led_trigger_event+0xa6/0xc0 [ 53.575558][ T3564] hci_dev_do_close+0x20a/0x1070 [ 53.580484][ T3564] ? _raw_spin_unlock_irqrestore+0xd9/0x130 [ 53.586367][ T3564] hci_rfkill_set_block+0x114/0x1a0 [ 53.591639][ T3564] ? rcu_lock_release+0x20/0x20 [ 53.596470][ T3564] rfkill_set_block+0x1e7/0x430 [ 53.601307][ T3564] rfkill_fop_write+0x5b7/0x790 [ 53.606159][ T3564] ? mark_lock+0x98/0x340 [ 53.610475][ T3564] ? rfkill_fop_read+0x470/0x470 [ 53.615394][ T3564] ? fsnotify_perm+0x64/0x590 [ 53.620063][ T3564] ? security_file_permission+0x75/0xa0 [ 53.625613][ T3564] ? rfkill_fop_read+0x470/0x470 [ 53.630546][ T3564] vfs_write+0x30c/0xe50 [ 53.634783][ T3564] ? file_end_write+0x250/0x250 [ 53.639632][ T3564] ? read_lock_is_recursive+0x10/0x10 [ 53.645002][ T3564] ? __context_tracking_exit+0x4c/0x80 [ 53.650487][ T3564] ? __lock_acquire+0x1ff0/0x1ff0 [ 53.655642][ T3564] ? __fdget_pos+0x1e9/0x380 [ 53.660226][ T3564] ksys_write+0x1a2/0x2c0 [ 53.664545][ T3564] ? print_irqtrace_events+0x210/0x210 [ 53.669993][ T3564] ? __ia32_sys_read+0x80/0x80 [ 53.674744][ T3564] ? syscall_enter_from_user_mode+0x2e/0x240 [ 53.680733][ T3564] ? lockdep_hardirqs_on+0x94/0x130 [ 53.685922][ T3564] ? syscall_enter_from_user_mode+0x2e/0x240 [ 53.691912][ T3564] do_syscall_64+0x3b/0xb0 [ 53.696324][ T3564] ? clear_bhb_loop+0x15/0x70 [ 53.700986][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 53.706895][ T3564] RIP: 0033:0x7f4e0edfe719 [ 53.711298][ T3564] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 b0 ff ff ff f7 d8 64 89 01 48 [ 53.730900][ T3564] RSP: 002b:00007ffc6a200458 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 53.739306][ T3564] RAX: ffffffffffffffda RBX: 00007f4e0ee5611b RCX: 00007f4e0edfe719 [ 53.747383][ T3564] RDX: 0000000000000008 RSI: 0000000020000300 RDI: 0000000000000003 [ 53.755346][ T3564] RBP: 00007f4e0ee560f9 R08: 000000ff00ff3650 R09: 000000ff00ff3650 [ 53.763393][ T3564] R10: 000000ff00ff3650 R11: 0000000000000246 R12: 00007f4e0ee5c1fc [ 53.771352][ T3564] R13: 00007f