====================================================== WARNING: possible circular locking dependency detected 6.10.0-syzkaller-09703-gd7e78951a8b8 #0 Not tainted ------------------------------------------------------ kworker/u9:2/5102 is trying to acquire lock: ffff88806d0ce258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline] ffff88806d0ce258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_ready net/bluetooth/sco.c:1290 [inline] ffff88806d0ce258 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_connect_cfm+0x461/0xb40 net/bluetooth/sco.c:1362 but task is already holding lock: ffff88802c777e20 (&conn->lock#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffff88802c777e20 (&conn->lock#2){+.+.}-{2:2}, at: sco_conn_ready net/bluetooth/sco.c:1277 [inline] ffff88802c777e20 (&conn->lock#2){+.+.}-{2:2}, at: sco_connect_cfm+0x28a/0xb40 net/bluetooth/sco.c:1362 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&conn->lock#2){+.+.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 __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:234 [inline] sco_connect net/bluetooth/sco.c:287 [inline] sco_sock_connect+0x347/0x990 net/bluetooth/sco.c:596 __sys_connect_file net/socket.c:2061 [inline] __sys_connect+0x2e1/0x310 net/socket.c:2078 __do_sys_connect net/socket.c:2088 [inline] __se_sys_connect net/socket.c:2085 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2085 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:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 lock_sock_nested+0x48/0x100 net/core/sock.c:3543 lock_sock include/net/sock.h:1607 [inline] sco_conn_ready net/bluetooth/sco.c:1290 [inline] sco_connect_cfm+0x461/0xb40 net/bluetooth/sco.c:1362 hci_connect_cfm include/net/bluetooth/hci_core.h:1965 [inline] hci_sync_conn_complete_evt+0x5ad/0xaa0 net/bluetooth/hci_event.c:5008 hci_event_func net/bluetooth/hci_event.c:7445 [inline] hci_event_packet+0xac4/0x1540 net/bluetooth/hci_event.c:7497 hci_rx_work+0x3e8/0xca0 net/bluetooth/hci_core.c:4029 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2e/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 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#2); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); lock(&conn->lock#2); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 5 locks held by kworker/u9:2/5102: #0: ffff88802c2d1948 ((wq_completion)hci7#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff88802c2d1948 ((wq_completion)hci7#2){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc9000309fd00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc9000309fd00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff88807123c078 (&hdev->lock){+.+.}-{3:3}, at: hci_sync_conn_complete_evt+0xb1/0xaa0 net/bluetooth/hci_event.c:4925 #3: ffffffff8f769ee8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm include/net/bluetooth/hci_core.h:1962 [inline] #3: ffffffff8f769ee8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_sync_conn_complete_evt+0x532/0xaa0 net/bluetooth/hci_event.c:5008 #4: ffff88802c777e20 (&conn->lock#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #4: ffff88802c777e20 (&conn->lock#2){+.+.}-{2:2}, at: sco_conn_ready net/bluetooth/sco.c:1277 [inline] #4: ffff88802c777e20 (&conn->lock#2){+.+.}-{2:2}, at: sco_connect_cfm+0x28a/0xb40 net/bluetooth/sco.c:1362 stack backtrace: CPU: 1 PID: 5102 Comm: kworker/u9:2 Not tainted 6.10.0-syzkaller-09703-gd7e78951a8b8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: hci7 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2186 check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 lock_sock_nested+0x48/0x100 net/core/sock.c:3543 lock_sock include/net/sock.h:1607 [inline] sco_conn_ready net/bluetooth/sco.c:1290 [inline] sco_connect_cfm+0x461/0xb40 net/bluetooth/sco.c:1362 hci_connect_cfm include/net/bluetooth/hci_core.h:1965 [inline] hci_sync_conn_complete_evt+0x5ad/0xaa0 net/bluetooth/hci_event.c:5008 hci_event_func net/bluetooth/hci_event.c:7445 [inline] hci_event_packet+0xac4/0x1540 net/bluetooth/hci_event.c:7497 hci_rx_work+0x3e8/0xca0 net/bluetooth/hci_core.c:4029 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2e/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 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:3545 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5102, name: kworker/u9:2 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 5102 Comm: kworker/u9:2 Not tainted 6.10.0-syzkaller-09703-gd7e78951a8b8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: hci7 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 __might_resched+0x5d4/0x780 kernel/sched/core.c:8437 lock_sock_nested+0x5d/0x100 net/core/sock.c:3545 lock_sock include/net/sock.h:1607 [inline] sco_conn_ready net/bluetooth/sco.c:1290 [inline] sco_connect_cfm+0x461/0xb40 net/bluetooth/sco.c:1362 hci_connect_cfm include/net/bluetooth/hci_core.h:1965 [inline] hci_sync_conn_complete_evt+0x5ad/0xaa0 net/bluetooth/hci_event.c:5008 hci_event_func net/bluetooth/hci_event.c:7445 [inline] hci_event_packet+0xac4/0x1540 net/bluetooth/hci_event.c:7497 hci_rx_work+0x3e8/0xca0 net/bluetooth/hci_core.c:4029 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2e/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Bluetooth: hci1: command tx timeout Bluetooth: hci7: command tx timeout Bluetooth: hci1: command tx timeout