Bluetooth: hci2: unexpected cc 0x1001 length: 249 > 9 Bluetooth: hci2: unexpected cc 0x0c23 length: 249 > 4 Bluetooth: hci2: unexpected cc 0x0c25 length: 249 > 3 Bluetooth: hci2: unexpected cc 0x0c38 length: 249 > 2 ====================================================== WARNING: possible circular locking dependency detected 6.0.0-rc5-syzkaller-00094-ga335366bad13 #0 Not tainted ------------------------------------------------------ kworker/u5:1/3784 is trying to acquire lock: ffff888026fa4130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1712 [inline] ffff888026fa4130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_del+0xfe/0x2f0 net/bluetooth/sco.c:197 but task is already holding lock: ffffffff8df2d3e8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm include/net/bluetooth/hci_core.h:1761 [inline] ffffffff8df2d3e8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_sco_setup+0xc5/0x600 net/bluetooth/hci_conn.c:569 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (hci_cb_list_lock){+.+.}-{3:3}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5666 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 hci_connect_cfm include/net/bluetooth/hci_core.h:1761 [inline] hci_remote_features_evt+0x610/0xa60 net/bluetooth/hci_event.c:3757 hci_event_func net/bluetooth/hci_event.c:7443 [inline] hci_event_packet+0x842/0x10c0 net/bluetooth/hci_event.c:7495 hci_rx_work+0x2fc/0x4a0 net/bluetooth/hci_core.c:4007 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 -> #1 (&hdev->lock){+.+.}-{3:3}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5666 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 sco_sock_connect+0x168/0x350 net/bluetooth/sco.c:593 __sys_connect_file net/socket.c:1976 [inline] __sys_connect+0x29b/0x2d0 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain+0x1872/0x6600 kernel/locking/lockdep.c:3829 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5053 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5666 lock_sock_nested+0x44/0xf0 net/core/sock.c:3393 lock_sock include/net/sock.h:1712 [inline] sco_conn_del+0xfe/0x2f0 net/bluetooth/sco.c:197 hci_connect_cfm include/net/bluetooth/hci_core.h:1764 [inline] hci_sco_setup+0x142/0x600 net/bluetooth/hci_conn.c:569 hci_conn_complete_evt+0xa50/0x1360 net/bluetooth/hci_event.c:3193 hci_event_func net/bluetooth/hci_event.c:7443 [inline] hci_event_packet+0x842/0x10c0 net/bluetooth/hci_event.c:7495 hci_rx_work+0x2fc/0x4a0 net/bluetooth/hci_core.c:4007 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: sk_lock-AF_BLUETOOTH-BTPROTO_SCO --> &hdev->lock --> hci_cb_list_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hci_cb_list_lock); lock(&hdev->lock); lock(hci_cb_list_lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 4 locks held by kworker/u5:1/3784: #0: ffff8880215aa138 ((wq_completion)hci1#2){+.+.}-{0:0}, at: process_one_work+0x796/0xd10 kernel/workqueue.c:2262 #1: ffffc90004ea7d00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264 #2: ffff88807ba30078 (&hdev->lock){+.+.}-{3:3}, at: hci_conn_complete_evt+0xb0/0x1360 net/bluetooth/hci_event.c:3089 #3: ffffffff8df2d3e8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm include/net/bluetooth/hci_core.h:1761 [inline] #3: ffffffff8df2d3e8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_sco_setup+0xc5/0x600 net/bluetooth/hci_conn.c:569 stack backtrace: CPU: 0 PID: 3784 Comm: kworker/u5:1 Not tainted 6.0.0-rc5-syzkaller-00094-ga335366bad13 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: hci1 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 check_noncircular+0x2f9/0x3b0 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain+0x1872/0x6600 kernel/locking/lockdep.c:3829 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5053 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5666 lock_sock_nested+0x44/0xf0 net/core/sock.c:3393 lock_sock include/net/sock.h:1712 [inline] sco_conn_del+0xfe/0x2f0 net/bluetooth/sco.c:197 hci_connect_cfm include/net/bluetooth/hci_core.h:1764 [inline] hci_sco_setup+0x142/0x600 net/bluetooth/hci_conn.c:569 hci_conn_complete_evt+0xa50/0x1360 net/bluetooth/hci_event.c:3193 hci_event_func net/bluetooth/hci_event.c:7443 [inline] hci_event_packet+0x842/0x10c0 net/bluetooth/hci_event.c:7495 hci_rx_work+0x2fc/0x4a0 net/bluetooth/hci_core.c:4007 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Bluetooth: hci5: Opcode 0x c03 failed: -110