Bluetooth: Wrong link type (-71) Bluetooth: hci2: link tx timeout Bluetooth: hci2: killing stalled connection 10: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: 5072, name: kworker/u5:3 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 3 locks held by kworker/u5:3/5072: #0: ffff88801a390538 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #0: ffff88801a390538 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703 #1: ffffc90003b1fd20 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #1: ffffc90003b1fd20 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703 #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:303 [inline] #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:749 [inline] #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: hci_link_tx_to net/bluetooth/hci_core.c:3414 [inline] #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: __check_timeout+0x162/0x3d0 net/bluetooth/hci_core.c:3567 CPU: 0 PID: 5072 Comm: kworker/u5:3 Not tainted 6.6.0-rc3-syzkaller-00214-ge402b08634b3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: hci2 hci_tx_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 __might_resched+0x5cf/0x780 kernel/sched/core.c:10187 __mutex_lock_common kernel/locking/mutex.c:580 [inline] __mutex_lock+0xc1/0xd60 kernel/locking/mutex.c:747 hci_cmd_sync_submit+0x3f/0x2e0 net/bluetooth/hci_sync.c:699 hci_disconnect+0xea/0x2c0 net/bluetooth/hci_conn.c:258 hci_link_tx_to net/bluetooth/hci_core.c:3421 [inline] __check_timeout+0x2b6/0x3d0 net/bluetooth/hci_core.c:3567 hci_sched_acl_pkt net/bluetooth/hci_core.c:3625 [inline] hci_sched_acl net/bluetooth/hci_core.c:3728 [inline] hci_tx_work+0xced/0x1e10 net/bluetooth/hci_core.c:3827 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703 worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 ============================= [ BUG: Invalid wait context ] 6.6.0-rc3-syzkaller-00214-ge402b08634b3 #0 Tainted: G W ----------------------------- kworker/u5:3/5072 is trying to lock: ffff8880193e89b0 (&hdev->unregister_lock){+.+.}-{3:3}, at: hci_cmd_sync_submit+0x3f/0x2e0 net/bluetooth/hci_sync.c:699 other info that might help us debug this: context-{4:4} 3 locks held by kworker/u5:3/5072: #0: ffff88801a390538 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #0: ffff88801a390538 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703 #1: ffffc90003b1fd20 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #1: ffffc90003b1fd20 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703 #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:303 [inline] #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:749 [inline] #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: hci_link_tx_to net/bluetooth/hci_core.c:3414 [inline] #2: ffffffff8d32c420 (rcu_read_lock){....}-{1:2}, at: __check_timeout+0x162/0x3d0 net/bluetooth/hci_core.c:3567 stack backtrace: CPU: 0 PID: 5072 Comm: kworker/u5:3 Tainted: G W 6.6.0-rc3-syzkaller-00214-ge402b08634b3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: hci2 hci_tx_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_lock_invalid_wait_context kernel/locking/lockdep.c:4750 [inline] check_wait_context kernel/locking/lockdep.c:4820 [inline] __lock_acquire+0x1825/0x7f70 kernel/locking/lockdep.c:5086 lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5753 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747 hci_cmd_sync_submit+0x3f/0x2e0 net/bluetooth/hci_sync.c:699 hci_disconnect+0xea/0x2c0 net/bluetooth/hci_conn.c:258 hci_link_tx_to net/bluetooth/hci_core.c:3421 [inline] __check_timeout+0x2b6/0x3d0 net/bluetooth/hci_core.c:3567 hci_sched_acl_pkt net/bluetooth/hci_core.c:3625 [inline] hci_sched_acl net/bluetooth/hci_core.c:3728 [inline] hci_tx_work+0xced/0x1e10 net/bluetooth/hci_core.c:3827 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703 worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304