Bluetooth: hci0: Injecting HCI hardware error event Bluetooth: hci0: hardware error 0x00 ============================================ WARNING: possible recursive locking detected 6.12.0-rc4-syzkaller-00261-g850925a8133c #0 Not tainted -------------------------------------------- kworker/u9:0/18544 is trying to acquire lock: ffff88805bc14078 (&hdev->lock){+.+.}-{3:3}, at: mgmt_set_connectable_complete+0x143/0x330 net/bluetooth/mgmt.c:1690 but task is already holding lock: ffff88805bc14078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x3ab/0x11b0 net/bluetooth/hci_sync.c:5189 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&hdev->lock); lock(&hdev->lock); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by kworker/u9:0/18544: #0: ffff88801e695148 ((wq_completion)hci0){+.+.}-{0:0}, at: process_one_work+0x129b/0x1ba0 kernel/workqueue.c:3204 #1: ffffc9000c1afd80 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_one_work+0x921/0x1ba0 kernel/workqueue.c:3205 #2: ffff88805bc14d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x26/0x90 net/bluetooth/hci_core.c:481 #3: ffff88805bc14078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x3ab/0x11b0 net/bluetooth/hci_sync.c:5189 #4: ffff88805bc14690 (&hdev->cmd_sync_work_lock){+.+.}-{3:3}, at: hci_cmd_sync_dequeue+0x50/0x1f0 net/bluetooth/hci_sync.c:883 stack backtrace: CPU: 1 UID: 0 PID: 18544 Comm: kworker/u9:0 Not tainted 6.12.0-rc4-syzkaller-00261-g850925a8133c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: hci0 hci_error_reset Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain kernel/locking/lockdep.c:3891 [inline] __lock_acquire+0x2185/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 mgmt_set_connectable_complete+0x143/0x330 net/bluetooth/mgmt.c:1690 _hci_cmd_sync_cancel_entry.constprop.0+0x6f/0x1d0 net/bluetooth/hci_sync.c:641 hci_cmd_sync_dequeue+0x178/0x1f0 net/bluetooth/hci_sync.c:886 cmd_complete_rsp+0x46/0x1e0 net/bluetooth/mgmt.c:1461 mgmt_pending_foreach+0xe2/0x140 net/bluetooth/mgmt_util.c:259 __mgmt_power_off+0x12a/0x2c0 net/bluetooth/mgmt.c:9474 hci_dev_close_sync+0xcbb/0x11b0 net/bluetooth/hci_sync.c:5197 hci_dev_do_close+0x2e/0x90 net/bluetooth/hci_core.c:483 hci_error_reset+0xbf/0x320 net/bluetooth/hci_core.c:1016 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244