Bluetooth: Wrong link type (-22) Bluetooth: Wrong link type (-22) Bluetooth: hci0: link tx timeout Bluetooth: hci0: killing stalled connection 11:aa:aa:aa:aa:aa BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 6059, name: kworker/u5:5 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 3 locks held by kworker/u5:5/6059: #0: ffff0000cbda6d38 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_one_work+0x560/0x1204 kernel/workqueue.c:2603 #1: ffff800096e37c20 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work+0x5a0/0x1204 kernel/workqueue.c:2605 #2: ffff80008e373780 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:302 CPU: 1 PID: 6059 Comm: kworker/u5:5 Not tainted 6.6.0-rc4-syzkaller-g19af4a4ed414 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: hci0 hci_tx_work Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 __might_resched+0x374/0x4d0 kernel/sched/core.c:10187 __might_sleep+0x90/0xe4 kernel/sched/core.c:10116 __mutex_lock_common+0xcc/0x21a0 kernel/locking/mutex.c:580 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799 hci_cmd_sync_submit+0x4c/0x230 net/bluetooth/hci_sync.c:699 hci_cmd_sync_queue+0x84/0x9c net/bluetooth/hci_sync.c:739 hci_abort_conn net/bluetooth/hci_conn.c:2928 [inline] hci_disconnect+0x2e8/0x4f4 net/bluetooth/hci_conn.c:258 hci_link_tx_to net/bluetooth/hci_core.c:3421 [inline] __check_timeout+0x27c/0x3ac net/bluetooth/hci_core.c:3567 hci_sched_le net/bluetooth/hci_core.c:3750 [inline] hci_tx_work+0xf88/0x1850 net/bluetooth/hci_core.c:3828 process_one_work+0x694/0x1204 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:2784 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857 ============================= [ BUG: Invalid wait context ] 6.6.0-rc4-syzkaller-g19af4a4ed414 #0 Tainted: G W ----------------------------- kworker/u5:5/6059 is trying to lock: ffff0000ca3c09b0 (&hdev->unregister_lock){+.+.}-{3:3}, at: hci_cmd_sync_submit+0x4c/0x230 net/bluetooth/hci_sync.c:699 other info that might help us debug this: context-{4:4} 3 locks held by kworker/u5:5/6059: #0: ffff0000cbda6d38 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_one_work+0x560/0x1204 kernel/workqueue.c:2603 #1: ffff800096e37c20 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work+0x5a0/0x1204 kernel/workqueue.c:2605 #2: ffff80008e373780 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:302 stack backtrace: CPU: 1 PID: 6059 Comm: kworker/u5:5 Tainted: G W 6.6.0-rc4-syzkaller-g19af4a4ed414 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: hci0 hci_tx_work Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 print_lock_invalid_wait_context kernel/locking/lockdep.c:4750 [inline] check_wait_context kernel/locking/lockdep.c:4820 [inline] __lock_acquire+0x1bec/0x75e8 kernel/locking/lockdep.c:5086 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799 hci_cmd_sync_submit+0x4c/0x230 net/bluetooth/hci_sync.c:699 hci_cmd_sync_queue+0x84/0x9c net/bluetooth/hci_sync.c:739 hci_abort_conn net/bluetooth/hci_conn.c:2928 [inline] hci_disconnect+0x2e8/0x4f4 net/bluetooth/hci_conn.c:258 hci_link_tx_to net/bluetooth/hci_core.c:3421 [inline] __check_timeout+0x27c/0x3ac net/bluetooth/hci_core.c:3567 hci_sched_le net/bluetooth/hci_core.c:3750 [inline] hci_tx_work+0xf88/0x1850 net/bluetooth/hci_core.c:3828 process_one_work+0x694/0x1204 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:2784 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857 Bluetooth: Wrong link type (-22) Bluetooth: Wrong link type (-22) Bluetooth: hci0: link tx timeout Bluetooth: hci0: killing stalled connection 11:aa:aa:aa:aa:aa Bluetooth: Wrong link type (-22) Bluetooth: Wrong link type (-22) Bluetooth: hci0: link tx timeout Bluetooth: hci0: killing stalled connection 11:aa:aa:aa:aa:aa Bluetooth: hci5: SCO packet for unknown connection handle 200 Bluetooth: hci0: unexpected event for opcode 0x0c1c Bluetooth: hci5: SCO packet for unknown connection handle 200 Bluetooth: hci0: unexpected event for opcode 0x0c1c Bluetooth: hci0: unexpected event for opcode 0x0c1c Bluetooth: hci0: unexpected event for opcode 0x0c1c Bluetooth: hci5: SCO packet for unknown connection handle 200 Bluetooth: hci0: unexpected event for opcode 0x936a Bluetooth: hci0: unexpected event for opcode 0x936a Bluetooth: hci0: unexpected event for opcode 0x936a Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: unexpected event 0x48 length: 51 > 3 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci5: wrong event for mode 0 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci0: Malformed Event: 0x02 Bluetooth: hci0: Malformed Event: 0x02 Bluetooth: hci0: Malformed Event: 0x02 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci0: unexpected event for opcode 0x2042 Bluetooth: hci0: hardware error 0xfb Bluetooth: hci0: Opcode 0x c03 failed: -110 Bluetooth: hci0: hardware error 0xfb Bluetooth: hci0: Opcode 0x c03 failed: -110 Bluetooth: hci5: ACL packet for unknown connection handle 200 bt_err_ratelimited: 65 callbacks suppressed Bluetooth: hci5: SCO packet for unknown connection handle 0 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: SCO packet for unknown connection handle 0 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: SCO packet for unknown connection handle 0 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 200 Bluetooth: hci5: ACL packet for unknown connection handle 1