Warning: Permanently added '10.128.1.144' (ED25519) to the list of known hosts. executing program [ 45.638709][ T3563] [ 45.641044][ T3563] ====================================================== [ 45.648033][ T3563] WARNING: possible circular locking dependency detected [ 45.655041][ T3563] 5.15.165-syzkaller #0 Not tainted [ 45.660202][ T3563] ------------------------------------------------------ [ 45.667199][ T3563] syz-executor134/3563 is trying to acquire lock: [ 45.673578][ T3563] ffff88807670cb98 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: __flush_work+0xcf/0x1a0 [ 45.683993][ T3563] [ 45.683993][ T3563] but task is already holding lock: [ 45.691327][ T3563] ffff88807670cff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 [ 45.700597][ T3563] [ 45.700597][ T3563] which lock already depends on the new lock. [ 45.700597][ T3563] [ 45.710967][ T3563] [ 45.710967][ T3563] the existing dependency chain (in reverse order) is: [ 45.719950][ T3563] [ 45.719950][ T3563] -> #3 (&hdev->req_lock){+.+.}-{3:3}: [ 45.727572][ T3563] lock_acquire+0x1db/0x4f0 [ 45.732570][ T3563] __mutex_lock_common+0x1da/0x25a0 [ 45.738294][ T3563] mutex_lock_nested+0x17/0x20 [ 45.743546][ T3563] hci_dev_do_close+0x63/0x1070 [ 45.748891][ T3563] hci_rfkill_set_block+0x114/0x1a0 [ 45.754577][ T3563] rfkill_set_block+0x1e7/0x430 [ 45.759916][ T3563] rfkill_fop_write+0x5b7/0x790 [ 45.765254][ T3563] vfs_write+0x30c/0xe50 [ 45.769987][ T3563] ksys_write+0x1a2/0x2c0 [ 45.774806][ T3563] do_syscall_64+0x3b/0xb0 [ 45.779716][ T3563] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 45.786098][ T3563] [ 45.786098][ T3563] -> #2 (rfkill_global_mutex){+.+.}-{3:3}: [ 45.794055][ T3563] lock_acquire+0x1db/0x4f0 [ 45.799047][ T3563] __mutex_lock_common+0x1da/0x25a0 [ 45.804734][ T3563] mutex_lock_nested+0x17/0x20 [ 45.809985][ T3563] rfkill_register+0x30/0x880 [ 45.815158][ T3563] hci_register_dev+0x4dd/0xa50 [ 45.820509][ T3563] vhci_create_device+0x310/0x590 [ 45.826175][ T3563] vhci_write+0x382/0x430 [ 45.831007][ T3563] vfs_write+0xacd/0xe50 [ 45.835752][ T3563] ksys_write+0x1a2/0x2c0 [ 45.840582][ T3563] do_syscall_64+0x3b/0xb0 [ 45.845517][ T3563] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 45.851904][ T3563] [ 45.851904][ T3563] -> #1 (&data->open_mutex){+.+.}-{3:3}: [ 45.859689][ T3563] lock_acquire+0x1db/0x4f0 [ 45.864687][ T3563] __mutex_lock_common+0x1da/0x25a0 [ 45.870378][ T3563] mutex_lock_nested+0x17/0x20 [ 45.875648][ T3563] vhci_send_frame+0x8a/0xf0 [ 45.880733][ T3563] hci_send_frame+0x1af/0x2f0 [ 45.885905][ T3563] hci_tx_work+0xb0b/0x19d0 [ 45.890900][ T3563] process_one_work+0x8a1/0x10c0 [ 45.896327][ T3563] worker_thread+0xaca/0x1280 [ 45.901492][ T3563] kthread+0x3f6/0x4f0 [ 45.906049][ T3563] ret_from_fork+0x1f/0x30 [ 45.910956][ T3563] [ 45.910956][ T3563] -> #0 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}: [ 45.920124][ T3563] validate_chain+0x1649/0x5930 [ 45.925464][ T3563] __lock_acquire+0x1295/0x1ff0 [ 45.930806][ T3563] lock_acquire+0x1db/0x4f0 [ 45.935799][ T3563] __flush_work+0xeb/0x1a0 [ 45.940702][ T3563] hci_dev_do_close+0x20a/0x1070 [ 45.946133][ T3563] hci_rfkill_set_block+0x114/0x1a0 [ 45.951935][ T3563] rfkill_set_block+0x1e7/0x430 [ 45.957274][ T3563] rfkill_fop_write+0x5b7/0x790 [ 45.962616][ T3563] vfs_write+0x30c/0xe50 [ 45.967348][ T3563] ksys_write+0x1a2/0x2c0 [ 45.972167][ T3563] do_syscall_64+0x3b/0xb0 [ 45.977074][ T3563] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 45.983460][ T3563] [ 45.983460][ T3563] other info that might help us debug this: [ 45.983460][ T3563] [ 45.993656][ T3563] Chain exists of: [ 45.993656][ T3563] (work_completion)(&hdev->tx_work) --> rfkill_global_mutex --> &hdev->req_lock [ 45.993656][ T3563] [ 46.008562][ T3563] Possible unsafe locking scenario: [ 46.008562][ T3563] [ 46.015980][ T3563] CPU0 CPU1 [ 46.021318][ T3563] ---- ---- [ 46.026653][ T3563] lock(&hdev->req_lock); [ 46.031056][ T3563] lock(rfkill_global_mutex); [ 46.038323][ T3563] lock(&hdev->req_lock); [ 46.045222][ T3563] lock((work_completion)(&hdev->tx_work)); [ 46.051188][ T3563] [ 46.051188][ T3563] *** DEADLOCK *** [ 46.051188][ T3563] [ 46.059314][ T3563] 2 locks held by syz-executor134/3563: [ 46.064822][ T3563] #0: ffffffff8dcbd1a8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0x1a5/0x790 [ 46.074872][ T3563] #1: ffff88807670cff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 [ 46.084574][ T3563] [ 46.084574][ T3563] stack backtrace: [ 46.090440][ T3563] CPU: 0 PID: 3563 Comm: syz-executor134 Not tainted 5.15.165-syzkaller #0 [ 46.098992][ T3563] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 [ 46.109013][ T3563] Call Trace: [ 46.112271][ T3563] [ 46.115173][ T3563] dump_stack_lvl+0x1e3/0x2d0 [ 46.119826][ T3563] ? io_uring_drop_tctx_refs+0x1a0/0x1a0 [ 46.125448][ T3563] ? print_circular_bug+0x12b/0x1a0 [ 46.130616][ T3563] check_noncircular+0x2f8/0x3b0 [ 46.135526][ T3563] ? add_chain_block+0x850/0x850 [ 46.140434][ T3563] ? lockdep_lock+0x11f/0x2a0 [ 46.145080][ T3563] ? stack_trace_save+0x113/0x1c0 [ 46.150075][ T3563] validate_chain+0x1649/0x5930 [ 46.154899][ T3563] ? reacquire_held_locks+0x660/0x660 [ 46.160238][ T3563] ? validate_chain+0x13bd/0x5930 [ 46.165229][ T3563] ? look_up_lock_class+0x77/0x120 [ 46.170311][ T3563] ? register_lock_class+0x100/0x9a0 [ 46.175563][ T3563] ? reacquire_held_locks+0x660/0x660 [ 46.180909][ T3563] ? is_dynamic_key+0x1f0/0x1f0 [ 46.185728][ T3563] ? mark_lock+0x98/0x340 [ 46.190022][ T3563] __lock_acquire+0x1295/0x1ff0 [ 46.194842][ T3563] lock_acquire+0x1db/0x4f0 [ 46.199311][ T3563] ? __flush_work+0xcf/0x1a0 [ 46.203873][ T3563] ? mark_lock+0x98/0x340 [ 46.208189][ T3563] ? read_lock_is_recursive+0x10/0x10 [ 46.213530][ T3563] ? __lock_acquire+0x1295/0x1ff0 [ 46.218525][ T3563] __flush_work+0xeb/0x1a0 [ 46.222911][ T3563] ? __flush_work+0xcf/0x1a0 [ 46.227471][ T3563] ? flush_work+0x20/0x20 [ 46.232141][ T3563] hci_dev_do_close+0x20a/0x1070 [ 46.237052][ T3563] ? _raw_spin_unlock_irqrestore+0xd9/0x130 [ 46.242917][ T3563] hci_rfkill_set_block+0x114/0x1a0 [ 46.248085][ T3563] ? rcu_lock_release+0x20/0x20 [ 46.252905][ T3563] rfkill_set_block+0x1e7/0x430 [ 46.257726][ T3563] rfkill_fop_write+0x5b7/0x790 [ 46.262547][ T3563] ? mark_lock+0x98/0x340 [ 46.266845][ T3563] ? rfkill_fop_read+0x470/0x470 [ 46.271771][ T3563] ? fsnotify_perm+0x64/0x590 [ 46.276421][ T3563] ? security_file_permission+0x75/0xa0 [ 46.281935][ T3563] ? rfkill_fop_read+0x470/0x470 [ 46.286862][ T3563] vfs_write+0x30c/0xe50 [ 46.291079][ T3563] ? file_end_write+0x250/0x250 [ 46.295900][ T3563] ? read_lock_is_recursive+0x10/0x10 [ 46.301239][ T3563] ? __context_tracking_exit+0x4c/0x80 [ 46.306671][ T3563] ? __lock_acquire+0x1ff0/0x1ff0 [ 46.311662][ T3563] ? __fdget_pos+0x1e9/0x380 [ 46.316223][ T3563] ksys_write+0x1a2/0x2c0 [ 46.320525][ T3563] ? print_irqtrace_events+0x210/0x210 [ 46.325953][ T3563] ? __ia32_sys_read+0x80/0x80 [ 46.330689][ T3563] ? syscall_enter_from_user_mode+0x2e/0x240 [ 46.336640][ T3563] ? lockdep_hardirqs_on+0x94/0x130 [ 46.341809][ T3563] ? syscall_enter_from_user_mode+0x2e/0x240 [ 46.347760][ T3563] do_syscall_64+0x3b/0xb0 [ 46.352148][ T3563] ? clear_bhb_loop+0x15/0x70 [ 46.356800][ T3563] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 46.362663][ T3563] RIP: 0033:0x7fa8f532c719 [ 46.367058][ T3563] 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 [ 46.386630][ T3563] RSP: 002b:00007fff88c53198 EFLAGS: 00000