====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G S L ------------------------------------------------------ syz.4.6245/30989 is trying to acquire lock: ffff8880362480b8 (&hdev->lock){+.+.}-{4:4}, at: l2cap_chan_connect+0x9c/0x1110 net/bluetooth/l2cap_core.c:7289 but task is already holding lock: ffffffff91400ce0 (rfcomm_mutex){+.+.}-{4:4}, at: rfcomm_dlc_open+0x9c/0x1080 net/bluetooth/rfcomm/core.c:426 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (rfcomm_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 rfcomm_security_cfm+0x90/0x820 net/bluetooth/rfcomm/core.c:2223 hci_encrypt_cfm+0x37e/0x500 include/net/bluetooth/hci_core.h:2243 hci_cc_read_enc_key_size+0x1fb/0x540 net/bluetooth/hci_event.c:777 hci_cc_func net/bluetooth/hci_event.c:4298 [inline] hci_cmd_complete_evt+0x49d/0xa00 net/bluetooth/hci_event.c:4315 hci_event_func net/bluetooth/hci_event.c:7884 [inline] hci_event_packet+0x67a/0xf10 net/bluetooth/hci_event.c:7938 hci_rx_work+0x3ee/0x1020 net/bluetooth/hci_core.c:4087 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (hci_cb_list_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 hci_connect_cfm include/net/bluetooth/hci_core.h:2164 [inline] hci_remote_features_evt+0x53d/0x950 net/bluetooth/hci_event.c:3786 hci_event_func net/bluetooth/hci_event.c:7887 [inline] hci_event_packet+0x6cd/0xf10 net/bluetooth/hci_event.c:7938 hci_rx_work+0x3ee/0x1020 net/bluetooth/hci_core.c:4087 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (&hdev->lock){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 l2cap_chan_connect+0x9c/0x1110 net/bluetooth/l2cap_core.c:7289 l2cap_sock_connect+0x5e4/0x7e0 net/bluetooth/l2cap_sock.c:255 kernel_connect+0x141/0x1c0 net/socket.c:3755 rfcomm_session_create net/bluetooth/rfcomm/core.c:808 [inline] __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:385 [inline] rfcomm_dlc_open+0x644/0x1080 net/bluetooth/rfcomm/core.c:428 rfcomm_sock_connect+0x2ed/0x650 net/bluetooth/rfcomm/sock.c:419 connect_socket net/socket.c:2141 [inline] __sys_connect_file net/socket.c:2166 [inline] __sys_connect+0x316/0x450 net/socket.c:2183 __do_sys_connect net/socket.c:2189 [inline] __se_sys_connect net/socket.c:2186 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2186 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &hdev->lock --> hci_cb_list_lock --> rfcomm_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rfcomm_mutex); lock(hci_cb_list_lock); lock(rfcomm_mutex); lock(&hdev->lock); *** DEADLOCK *** locks held by syz.4.6245/30989: 1, last CPU#0: #0: ffffffff91400ce0 (rfcomm_mutex){+.+.}-{4:4}, at: rfcomm_dlc_open+0x9c/0x1080 net/bluetooth/rfcomm/core.c:426 stack backtrace: CPU: 0 UID: 0 PID: 30989 Comm: syz.4.6245 Tainted: G S L syzkaller #0 PREEMPT(full) Tainted: [S]=CPU_OUT_OF_SPEC, [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 l2cap_chan_connect+0x9c/0x1110 net/bluetooth/l2cap_core.c:7289 l2cap_sock_connect+0x5e4/0x7e0 net/bluetooth/l2cap_sock.c:255 kernel_connect+0x141/0x1c0 net/socket.c:3755 rfcomm_session_create net/bluetooth/rfcomm/core.c:808 [inline] __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:385 [inline] rfcomm_dlc_open+0x644/0x1080 net/bluetooth/rfcomm/core.c:428 rfcomm_sock_connect+0x2ed/0x650 net/bluetooth/rfcomm/sock.c:419 connect_socket net/socket.c:2141 [inline] __sys_connect_file net/socket.c:2166 [inline] __sys_connect+0x316/0x450 net/socket.c:2183 __do_sys_connect net/socket.c:2189 [inline] __se_sys_connect net/socket.c:2186 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2186 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0eb5b9e1d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0eb69dc028 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f0eb5e25fa0 RCX: 00007f0eb5b9e1d9 RDX: 000000000000000a RSI: 0000200000000040 RDI: 0000000000000004 RBP: 00007f0eb5c35888 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0eb5e26038 R14: 00007f0eb5e25fa0 R15: 00007ffecafb0dd8 hci9: dst 12:aa:aa:aa:aa:aa hci9: dst 12:aa:aa:aa:aa:aa handle 0x0f00 hci9 orig refcnt 11 hci9: conn ffff888065b0c000 hcon ffff888065b0c000 orig refcnt 0 hci9 hcon ffff888065b0c000 hcon ffff888065b0c000 conn ffff888027893800 hchan ffff88801f7f7300 conn ffff888027893800, psm 0x03, dcid 0x0000 chan ffff888026197000 orig refcnt 1 hcon ffff888065b0c000 orig refcnt 1 hcon ffff888065b0c000 orig refcnt 2 chan ffff888026197000 BT_BOUND -> BT_CONNECT chan ffff888026197000 state BT_CONNECT timeout 4000 chan ffff888026197000 orig refcnt 2 hci9 orig refcnt 13 sk ffff888026196000 ffff88807c7a6400 dlc ffff88807c7a6400 session ffff888084b99b00 session ffff888084b99b00 state 3 dlc ffff88807c7a6400 state 7 timeout 3000 sock ffff88807610cb00, sk ffff888026194000 sock ffff88807610cb00, sk ffff888026194000 sk ffff888026194000 state 9 refcnt 2 sk ffff888026194000 dlc ffff88807c7a6400 ffff88807c7a6400 kcov: kcov_task_exit: t = ffff8880764c5dc0, kcov->t = ffff8880764c5dc0