Bluetooth: hci0: hardware error 0x00 ============================================ WARNING: possible recursive locking detected 6.12.0-rc6-syzkaller #0 Not tainted -------------------------------------------- kworker/u9:6/5853 is trying to acquire lock: ffff888067ab0078 (&hdev->lock){+.+.}-{3:3}, at: mgmt_set_connectable_complete+0xaf/0x500 net/bluetooth/mgmt.c:1690 but task is already holding lock: ffff888067ab0078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x5c8/0x11c0 net/bluetooth/hci_sync.c:5193 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:6/5853: #0: ffff888029bd6148 ((wq_completion)hci0){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff888029bd6148 ((wq_completion)hci0){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310 #1: ffffc9000319fd00 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc9000319fd00 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310 #2: ffff888067ab0d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:481 [inline] #2: ffff888067ab0d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_error_reset+0x124/0x3f0 net/bluetooth/hci_core.c:1016 #3: ffff888067ab0078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x5c8/0x11c0 net/bluetooth/hci_sync.c:5193 #4: ffff888067ab0690 (&hdev->cmd_sync_work_lock){+.+.}-{3:3}, at: hci_cmd_sync_dequeue+0x44/0x3d0 net/bluetooth/hci_sync.c:887 stack backtrace: CPU: 0 UID: 0 PID: 5853 Comm: kworker/u9:6 Not tainted 6.12.0-rc6-syzkaller #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+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 mgmt_set_connectable_complete+0xaf/0x500 net/bluetooth/mgmt.c:1690 _hci_cmd_sync_cancel_entry net/bluetooth/hci_sync.c:645 [inline] hci_cmd_sync_dequeue+0x22d/0x3d0 net/bluetooth/hci_sync.c:890 cmd_complete_rsp+0x4c/0x180 net/bluetooth/mgmt.c:1461 mgmt_pending_foreach+0xd3/0x130 net/bluetooth/mgmt_util.c:259 __mgmt_power_off+0x183/0x430 net/bluetooth/mgmt.c:9474 hci_dev_close_sync+0x6c4/0x11c0 net/bluetooth/hci_sync.c:5201 hci_dev_do_close net/bluetooth/hci_core.c:483 [inline] hci_error_reset+0x12c/0x3f0 net/bluetooth/hci_core.c:1016 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244