====================================================== WARNING: possible circular locking dependency detected 5.19.0-rc5-next-20220707 #1 Not tainted ------------------------------------------------------ syz-executor.3/4472 is trying to acquire lock: ffff8880451e0130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_del+0x11c/0x2c0 but task is already holding lock: ffffffff857d26e8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (hci_cb_list_lock){+.+.}-{3:3}: __mutex_lock+0x136/0x14d0 hci_connect_cfm+0x26/0x140 hci_remote_features_evt+0x479/0x870 hci_event_packet+0x779/0xee0 hci_rx_work+0x499/0xba0 process_one_work+0xa0f/0x1690 worker_thread+0x637/0x1250 kthread+0x2ed/0x3a0 ret_from_fork+0x22/0x30 -> #1 (&hdev->lock){+.+.}-{3:3}: __mutex_lock+0x136/0x14d0 sco_sock_connect+0x1e0/0xa60 __sys_connect_file+0x151/0x190 __sys_connect+0x161/0x190 __x64_sys_connect+0x6f/0xb0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: __lock_acquire+0x29fe/0x5e70 lock_acquire+0x1a2/0x530 lock_sock_nested+0x3d/0xf0 sco_conn_del+0x11c/0x2c0 sco_disconn_cfm+0x62/0x80 hci_conn_hash_flush+0x119/0x230 hci_dev_close_sync+0x4dc/0xf20 hci_unregister_dev+0x10f/0x380 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xaf4/0x27d0 do_group_exit+0xd2/0x2f0 get_signal+0x2201/0x24b0 arch_do_signal_or_restart+0x89/0x1be0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x19/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 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 *** 3 locks held by syz-executor.3/4472: #0: ffff888016e2d048 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x107/0x380 #1: ffff888016e2c078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x241/0xf20 #2: ffffffff857d26e8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 stack backtrace: CPU: 1 PID: 4472 Comm: syz-executor.3 Not tainted 5.19.0-rc5-next-20220707 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 check_noncircular+0x25f/0x2e0 __lock_acquire+0x29fe/0x5e70 lock_acquire+0x1a2/0x530 lock_sock_nested+0x3d/0xf0 sco_conn_del+0x11c/0x2c0 sco_disconn_cfm+0x62/0x80 hci_conn_hash_flush+0x119/0x230 hci_dev_close_sync+0x4dc/0xf20 hci_unregister_dev+0x10f/0x380 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xaf4/0x27d0 do_group_exit+0xd2/0x2f0 get_signal+0x2201/0x24b0 arch_do_signal_or_restart+0x89/0x1be0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x19/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f7e70e18b19 Code: Unable to access opcode bytes at RIP 0x7f7e70e18aef. RSP: 002b:00007f7e6e36d218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f7e70f2c028 RCX: 00007f7e70e18b19 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f7e70f2c028 RBP: 00007f7e70f2c020 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7e70f2c02c R13: 00007ffe7d2add5f R14: 00007f7e6e36d300 R15: 0000000000022000 Bluetooth: hci4: Opcode 0x c03 failed: -110 Bluetooth: hci4: Opcode 0x c03 failed: -110