======================================================
WARNING: possible circular locking dependency detected
6.14.0-rc6-syzkaller-00003-g4d872d51bc9d #0 Not tainted
------------------------------------------------------
kworker/u9:8/5839 is trying to acquire lock:
ffff88805acd3258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1624 [inline]
ffff88805acd3258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_ready net/bluetooth/sco.c:1341 [inline]
ffff88805acd3258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_connect_cfm+0x439/0xae0 net/bluetooth/sco.c:1415
but task is already holding lock:
ffff8880334b4620 (&conn->lock#3){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff8880334b4620 (&conn->lock#3){+.+.}-{3:3}, at: sco_conn_ready net/bluetooth/sco.c:1328 [inline]
ffff8880334b4620 (&conn->lock#3){+.+.}-{3:3}, at: sco_connect_cfm+0x262/0xae0 net/bluetooth/sco.c:1415
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&conn->lock#3){+.+.}-{3:3}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2e/0x40 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+0x34c/0x9b0 net/bluetooth/sco.c:648
__sys_connect_file net/socket.c:2045 [inline]
__sys_connect+0x288/0x2d0 net/socket.c:2064
__do_sys_connect net/socket.c:2070 [inline]
__se_sys_connect net/socket.c:2067 [inline]
__x64_sys_connect+0x7a/0x90 net/socket.c:2067
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3163 [inline]
check_prevs_add kernel/locking/lockdep.c:3282 [inline]
validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3906
__lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
lock_sock_nested+0x48/0x100 net/core/sock.c:3662
lock_sock include/net/sock.h:1624 [inline]
sco_conn_ready net/bluetooth/sco.c:1341 [inline]
sco_connect_cfm+0x439/0xae0 net/bluetooth/sco.c:1415
hci_connect_cfm include/net/bluetooth/hci_core.h:2051 [inline]
hci_conn_request_evt+0x8e9/0xf00 net/bluetooth/hci_event.c:3328
hci_event_func net/bluetooth/hci_event.c:7473 [inline]
hci_event_packet+0xac1/0x1540 net/bluetooth/hci_event.c:7525
hci_rx_work+0x3f3/0xdb0 net/bluetooth/hci_core.c:4015
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
worker_thread+0x870/0xd30 kernel/workqueue.c:3400
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&conn->lock#3);
lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO);
lock(&conn->lock#3);
lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO);
*** DEADLOCK ***
3 locks held by kworker/u9:8/5839:
#0: ffff88807c01c148 ((wq_completion)hci1#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3213 [inline]
#0: ffff88807c01c148 ((wq_completion)hci1#2){+.+.}-{0:0}, at: process_scheduled_works+0x98b/0x18e0 kernel/workqueue.c:3319
#1: ffffc90004377c60 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3214 [inline]
#1: ffffc90004377c60 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9c6/0x18e0 kernel/workqueue.c:3319
#2: ffff8880334b4620 (&conn->lock#3){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#2: ffff8880334b4620 (&conn->lock#3){+.+.}-{3:3}, at: sco_conn_ready net/bluetooth/sco.c:1328 [inline]
#2: ffff8880334b4620 (&conn->lock#3){+.+.}-{3:3}, at: sco_connect_cfm+0x262/0xae0 net/bluetooth/sco.c:1415
stack backtrace:
CPU: 1 UID: 0 PID: 5839 Comm: kworker/u9:8 Not tainted 6.14.0-rc6-syzkaller-00003-g4d872d51bc9d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: hci1 hci_rx_work
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2076
check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2208
check_prev_add kernel/locking/lockdep.c:3163 [inline]
check_prevs_add kernel/locking/lockdep.c:3282 [inline]
validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3906
__lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
lock_sock_nested+0x48/0x100 net/core/sock.c:3662
lock_sock include/net/sock.h:1624 [inline]
sco_conn_ready net/bluetooth/sco.c:1341 [inline]
sco_connect_cfm+0x439/0xae0 net/bluetooth/sco.c:1415
hci_connect_cfm include/net/bluetooth/hci_core.h:2051 [inline]
hci_conn_request_evt+0x8e9/0xf00 net/bluetooth/hci_event.c:3328
hci_event_func net/bluetooth/hci_event.c:7473 [inline]
hci_event_packet+0xac1/0x1540 net/bluetooth/hci_event.c:7525
hci_rx_work+0x3f3/0xdb0 net/bluetooth/hci_core.c:4015
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
worker_thread+0x870/0xd30 kernel/workqueue.c:3400
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
BUG: sleeping function called from invalid context at net/core/sock.c:3664
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5839, name: kworker/u9:8
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 UID: 0 PID: 5839 Comm: kworker/u9:8 Not tainted 6.14.0-rc6-syzkaller-00003-g4d872d51bc9d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: hci1 hci_rx_work
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
__might_resched+0x5d4/0x780 kernel/sched/core.c:8767
lock_sock_nested+0x5d/0x100 net/core/sock.c:3664
lock_sock include/net/sock.h:1624 [inline]
sco_conn_ready net/bluetooth/sco.c:1341 [inline]
sco_connect_cfm+0x439/0xae0 net/bluetooth/sco.c:1415
hci_connect_cfm include/net/bluetooth/hci_core.h:2051 [inline]
hci_conn_request_evt+0x8e9/0xf00 net/bluetooth/hci_event.c:3328
hci_event_func net/bluetooth/hci_event.c:7473 [inline]
hci_event_packet+0xac1/0x1540 net/bluetooth/hci_event.c:7525
hci_rx_work+0x3f3/0xdb0 net/bluetooth/hci_core.c:4015
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
worker_thread+0x870/0xd30 kernel/workqueue.c:3400
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244