====================================================== WARNING: possible circular locking dependency detected 6.13.0-rc7-syzkaller-g1950a0af2d55 #0 Not tainted ------------------------------------------------------ kworker/u9:6/6455 is trying to acquire lock: ffff0000f0936258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1623 [inline] ffff0000f0936258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_ready net/bluetooth/sco.c:1341 [inline] ffff0000f0936258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_connect_cfm+0x3d8/0x8f4 net/bluetooth/sco.c:1415 but task is already holding lock: ffff0000c7bfb220 (&conn->lock#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] ffff0000c7bfb220 (&conn->lock#2){+.+.}-{3:3}, at: sco_conn_ready net/bluetooth/sco.c:1328 [inline] ffff0000c7bfb220 (&conn->lock#2){+.+.}-{3:3}, at: sco_connect_cfm+0x24c/0x8f4 net/bluetooth/sco.c:1415 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&conn->lock#2){+.+.}-{3:3}: __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] sco_chan_add net/bluetooth/sco.c:292 [inline] sco_connect net/bluetooth/sco.c:348 [inline] sco_sock_connect+0x2c0/0x824 net/bluetooth/sco.c:648 __sys_connect_file net/socket.c:2055 [inline] __sys_connect+0x260/0x294 net/socket.c:2074 __do_sys_connect net/socket.c:2080 [inline] __se_sys_connect net/socket.c:2077 [inline] __arm64_sys_connect+0x7c/0x94 net/socket.c:2077 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5226 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849 lock_sock_nested+0x5c/0x11c net/core/sock.c:3625 lock_sock include/net/sock.h:1623 [inline] sco_conn_ready net/bluetooth/sco.c:1341 [inline] sco_connect_cfm+0x3d8/0x8f4 net/bluetooth/sco.c:1415 hci_connect_cfm+0x120/0x1d4 include/net/bluetooth/hci_core.h:2057 hci_conn_request_evt+0x66c/0xb08 net/bluetooth/hci_event.c:3328 hci_event_func net/bluetooth/hci_event.c:7473 [inline] hci_event_packet+0x8dc/0x106c net/bluetooth/hci_event.c:7525 hci_rx_work+0x31c/0xb04 net/bluetooth/hci_core.c:4035 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3398 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&conn->lock#2); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); lock(&conn->lock#2); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 3 locks held by kworker/u9:6/6455: #0: ffff0000eaf61948 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work+0x60c/0x15cc kernel/workqueue.c:3210 #1: ffff8000a33a7c20 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x6a4/0x15cc kernel/workqueue.c:3210 #2: ffff0000c7bfb220 (&conn->lock#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff0000c7bfb220 (&conn->lock#2){+.+.}-{3:3}, at: sco_conn_ready net/bluetooth/sco.c:1328 [inline] #2: ffff0000c7bfb220 (&conn->lock#2){+.+.}-{3:3}, at: sco_connect_cfm+0x24c/0x8f4 net/bluetooth/sco.c:1415 stack backtrace: CPU: 0 UID: 0 PID: 6455 Comm: kworker/u9:6 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: hci2 hci_rx_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x154/0x1c0 kernel/locking/lockdep.c:2074 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5226 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849 lock_sock_nested+0x5c/0x11c net/core/sock.c:3625 lock_sock include/net/sock.h:1623 [inline] sco_conn_ready net/bluetooth/sco.c:1341 [inline] sco_connect_cfm+0x3d8/0x8f4 net/bluetooth/sco.c:1415 hci_connect_cfm+0x120/0x1d4 include/net/bluetooth/hci_core.h:2057 hci_conn_request_evt+0x66c/0xb08 net/bluetooth/hci_event.c:3328 hci_event_func net/bluetooth/hci_event.c:7473 [inline] hci_event_packet+0x8dc/0x106c net/bluetooth/hci_event.c:7525 hci_rx_work+0x31c/0xb04 net/bluetooth/hci_core.c:4035 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3398 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 BUG: sleeping function called from invalid context at net/core/sock.c:3627 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6455, name: kworker/u9:6 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [] spin_lock include/linux/spinlock.h:351 [inline] [] sco_conn_ready net/bluetooth/sco.c:1328 [inline] [] sco_connect_cfm+0x24c/0x8f4 net/bluetooth/sco.c:1415 CPU: 0 UID: 0 PID: 6455 Comm: kworker/u9:6 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: hci2 hci_rx_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 __might_resched+0x374/0x4d0 kernel/sched/core.c:8758 __might_sleep+0x90/0xe4 kernel/sched/core.c:8687 lock_sock_nested+0x6c/0x11c net/core/sock.c:3627 lock_sock include/net/sock.h:1623 [inline] sco_conn_ready net/bluetooth/sco.c:1341 [inline] sco_connect_cfm+0x3d8/0x8f4 net/bluetooth/sco.c:1415 hci_connect_cfm+0x120/0x1d4 include/net/bluetooth/hci_core.h:2057 hci_conn_request_evt+0x66c/0xb08 net/bluetooth/hci_event.c:3328 hci_event_func net/bluetooth/hci_event.c:7473 [inline] hci_event_packet+0x8dc/0x106c net/bluetooth/hci_event.c:7525 hci_rx_work+0x31c/0xb04 net/bluetooth/hci_core.c:4035 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3398 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 Bluetooth: hci2: unexpected event 0x03 length: 17 > 11 Bluetooth: hci2: Ignoring HCI_Connection_Complete for existing connection Bluetooth: hci3: command tx timeout Bluetooth: hci2: command 0x042a tx timeout