Bluetooth: Wrong link type (-22) Bluetooth: hci4: link tx timeout Bluetooth: hci4: 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: 14275, name: kworker/u5:2 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 3 locks held by kworker/u5:2/14275: #0: ffff888017433938 ((wq_completion)hci4#2){+.+.}-{0:0}, at: process_one_work+0x99d/0x1770 #1: ffff888040ef7d90 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work+0x9d0/0x1770 #2: ffffffff8560b740 (rcu_read_lock){....}-{1:2}, at: __check_timeout+0x171/0x480 CPU: 0 PID: 14275 Comm: kworker/u5:2 Not tainted 6.5.0-rc1-next-20230712 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: hci4 hci_tx_work Call Trace: dump_stack_lvl+0xc1/0xf0 __might_resched+0x2f9/0x510 __mutex_lock+0x9e/0x1a30 hci_cmd_sync_submit+0x3b/0x2d0 hci_cmd_sync_queue+0x7b/0xb0 hci_disconnect+0x1c2/0x450 __check_timeout+0x2cc/0x480 hci_tx_work+0x7cb/0x1a70 process_one_work+0xabf/0x1770 worker_thread+0x64f/0x12a0 kthread+0x33f/0x440 ret_from_fork+0x2f/0x70 ret_from_fork_asm+0x1b/0x30 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ============================= [ BUG: Invalid wait context ] 6.5.0-rc1-next-20230712 #1 Tainted: G W ----------------------------- kworker/u5:2/14275 is trying to lock: ffff8880204149b0 (&hdev->unregister_lock){+.+.}-{3:3}, at: hci_cmd_sync_submit+0x3b/0x2d0 other info that might help us debug this: context-{4:4} 3 locks held by kworker/u5:2/14275: #0: ffff888017433938 ((wq_completion)hci4#2){+.+.}-{0:0}, at: process_one_work+0x99d/0x1770 #1: ffff888040ef7d90 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work+0x9d0/0x1770 #2: ffffffff8560b740 (rcu_read_lock){....}-{1:2}, at: __check_timeout+0x171/0x480 stack backtrace: CPU: 0 PID: 14275 Comm: kworker/u5:2 Tainted: G W 6.5.0-rc1-next-20230712 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: hci4 hci_tx_work Call Trace: dump_stack_lvl+0x91/0xf0 __lock_acquire+0x1605/0x6340 lock_acquire+0x19a/0x4c0 Bluetooth: hci1: unexpected event for opcode 0x043d __mutex_lock+0x12a/0x1a30 hci_cmd_sync_submit+0x3b/0x2d0 hci_cmd_sync_queue+0x7b/0xb0 hci_disconnect+0x1c2/0x450 __check_timeout+0x2cc/0x480 hci_tx_work+0x7cb/0x1a70 process_one_work+0xabf/0x1770 worker_thread+0x64f/0x12a0 kthread+0x33f/0x440 ret_from_fork+0x2f/0x70 ret_from_fork_asm+0x1b/0x30 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Bluetooth: Wrong link type (-22) Bluetooth: hci4: link tx timeout Bluetooth: hci4: killing stalled connection 11:aa:aa:aa:aa:aa SELinux: security_context_str_to_sid (root) failed with errno=-22 Bluetooth: hci1: unexpected event for opcode 0x043d Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout ------------[ cut here ]------------ WARNING: CPU: 0 PID: 14275 at net/bluetooth/hci_conn.c:619 hci_conn_timeout+0x81/0x130 Modules linked in: CPU: 0 PID: 14275 Comm: kworker/u5:2 Tainted: G W 6.5.0-rc1-next-20230712 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: hci3 hci_conn_timeout RIP: 0010:hci_conn_timeout+0x81/0x130 Code: ee e8 d3 62 6a fd 85 ed 78 1b e8 2a 67 6a fd 31 ff 89 ee e8 c1 62 6a fd 85 ed 74 10 5b 5d 41 5c e9 14 67 6a fd e8 0f 67 6a fd <0f> 0b e8 08 67 6a fd 48 8d bb c9 fd ff ff 48 b8 00 00 00 00 00 fc RSP: 0018:ffff888040ef7ce0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888041086270 RCX: 0000000000000000 RDX: ffff888042c4d1c0 RSI: ffffffff83e20ed1 RDI: 0000000000000005 RBP: 00000000fffffffe R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffffe R11: 0000000000000000 R12: ffff888040ef7d90 R13: ffff88800f76de00 R14: ffff88800fde3000 R15: ffff888013f46c00 FS: 0000000000000000(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056290cce1618 CR3: 0000000005482000 CR4: 0000000000350ef0 Call Trace: process_one_work+0xabf/0x1770 worker_thread+0x64f/0x12a0 kthread+0x33f/0x440 ret_from_fork+0x2f/0x70 ret_from_fork_asm+0x1b/0x30 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 irq event stamp: 5733 hardirqs last enabled at (5733): [] finish_task_switch.isra.0+0x203/0x830 hardirqs last disabled at (5732): [] __schedule+0x127d/0x2b00 softirqs last enabled at (5730): [] irq_exit_rcu+0x93/0xc0 softirqs last disabled at (5205): [] irq_exit_rcu+0x93/0xc0 ---[ end trace 0000000000000000 ]--- Bluetooth: hci4: SCO packet for unknown connection handle 1 SELinux: security_context_str_to_sid (root) failed with errno=-22 Bluetooth: hci4: SCO packet for unknown connection handle 1 loop1: detected capacity change from 0 to 40 Bluetooth: hci1: unexpected event for opcode 0x043d SELinux: security_context_str_to_sid (root) failed with errno=-22 Bluetooth: Unexpected start frame (len 10) loop1: detected capacity change from 0 to 40 Bluetooth: hci1: unexpected event for opcode 0x043d