====================================================== WARNING: possible circular locking dependency detected 6.1.0-rc7-next-20221202 #1 Not tainted ------------------------------------------------------ syz-executor.6/6654 is trying to acquire lock: ffff8880426f4130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_del+0x11c/0x2c0 but task is already holding lock: ffffffff85be2f28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xcb/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/0x14e0 hci_remote_features_evt+0x47e/0x990 hci_event_packet+0x91d/0xf60 hci_rx_work+0xa86/0x1000 process_one_work+0xa17/0x16a0 worker_thread+0x63b/0x1260 kthread+0x2f1/0x3a0 ret_from_fork+0x2c/0x50 -> #1 (&hdev->lock){+.+.}-{3:3}: __mutex_lock+0x136/0x14e0 sco_sock_connect+0x1e8/0xa60 __sys_connect_file+0x159/0x1a0 __sys_connect+0x169/0x1a0 __x64_sys_connect+0x73/0xb0 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a6/0x530 lock_sock_nested+0x41/0xf0 sco_conn_del+0x11c/0x2c0 sco_disconn_cfm+0x66/0x80 hci_conn_hash_flush+0x11d/0x230 hci_dev_close_sync+0x57f/0xff0 hci_unregister_dev+0x113/0x380 vhci_release+0x80/0x100 __fput+0x263/0xa40 task_work_run+0x174/0x280 do_exit+0xa8e/0x2720 do_group_exit+0xd4/0x2a0 __x64_sys_exit_group+0x3e/0x50 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc 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.6/6654: #0: ffff888045d35028 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x10b/0x380 #1: ffff888045d34078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x2e4/0xff0 #2: ffffffff85be2f28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xcb/0x230 stack backtrace: CPU: 1 PID: 6654 Comm: syz-executor.6 Not tainted 6.1.0-rc7-next-20221202 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x8f/0xb7 check_noncircular+0x263/0x2e0 __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a6/0x530 lock_sock_nested+0x41/0xf0 sco_conn_del+0x11c/0x2c0 sco_disconn_cfm+0x66/0x80 hci_conn_hash_flush+0x11d/0x230 hci_dev_close_sync+0x57f/0xff0 hci_unregister_dev+0x113/0x380 vhci_release+0x80/0x100 __fput+0x263/0xa40 task_work_run+0x174/0x280 do_exit+0xa8e/0x2720 do_group_exit+0xd4/0x2a0 __x64_sys_exit_group+0x3e/0x50 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f028fe13b19 Code: Unable to access opcode bytes at 0x7f028fe13aef. RSP: 002b:00007fffafa58568 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000064 RCX: 00007f028fe13b19 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 00007f028fe6d177 R08: 000000000000000c R09: 0000555555d903bc R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000016 R13: 00007fffafa59840 R14: 0000555555d903bc R15: 00007fffafa5a940 cgroup: fork rejected by pids controller in /syz4 Bluetooth: hci4: Opcode 0x c03 failed: -110 Bluetooth: hci4: Opcode 0x c03 failed: -110