loop6: detected capacity change from 0 to 264192 loop5: detected capacity change from 0 to 6 loop5: detected capacity change from 0 to 6 ====================================================== WARNING: possible circular locking dependency detected 5.17.0-next-20220401 #1 Not tainted ------------------------------------------------------ syz-executor.7/6966 is trying to acquire lock: ffff88800f916130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_del+0x11c/0x2c0 but task is already holding lock: ffffffff857c6cc8 (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/0x1480 hci_remote_features_evt+0x59d/0x990 hci_event_packet+0x779/0xee0 hci_rx_work+0x24c/0xb90 process_one_work+0xa1c/0x16a0 worker_thread+0x637/0x1250 kthread+0x2f2/0x3b0 ret_from_fork+0x22/0x30 -> #1 (&hdev->lock){+.+.}-{3:3}: __mutex_lock+0x136/0x1480 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+0x44/0xae -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: __lock_acquire+0x2c2f/0x6120 lock_acquire+0x1a2/0x4d0 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+0x15b/0x3f0 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xaf7/0x27e0 do_group_exit+0xd2/0x2f0 __x64_sys_exit_group+0x3a/0x50 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae 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.7/6966: #0: ffff888010879048 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x153/0x3f0 #1: ffff888010878078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x241/0xf20 #2: ffffffff857c6cc8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 stack backtrace: CPU: 1 PID: 6966 Comm: syz-executor.7 Not tainted 5.17.0-next-20220401 #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+0x2c2f/0x6120 lock_acquire+0x1a2/0x4d0 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+0x15b/0x3f0 vhci_release+0x7c/0xf0 __fput+0x272/0x9d0 task_work_run+0xe2/0x1a0 do_exit+0xaf7/0x27e0 do_group_exit+0xd2/0x2f0 __x64_sys_exit_group+0x3a/0x50 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f1122e13b19 Code: Unable to access opcode bytes at RIP 0x7f1122e13aef. RSP: 002b:00007ffcb39ad058 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000064 RCX: 00007f1122e13b19 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 00007f1122e6d177 R08: 000000000000000c R09: 00005555559a13bc R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000016 R13: 00007ffcb39ae330 R14: 00005555559a13bc R15: 00007ffcb39af430 loop5: detected capacity change from 0 to 6 loop6: detected capacity change from 0 to 264192 loop5: detected capacity change from 0 to 6 loop5: detected capacity change from 0 to 6 Bluetooth: hci4: Opcode 0x c03 failed: -110 Bluetooth: hci4: unexpected cc 0x0c03 length: 249 > 1 Bluetooth: hci4: unexpected cc 0x1003 length: 249 > 9 Bluetooth: hci4: unexpected cc 0x1001 length: 249 > 9 Bluetooth: hci4: unexpected cc 0x0c23 length: 249 > 4 Bluetooth: hci4: unexpected cc 0x0c25 length: 249 > 3 Bluetooth: hci4: unexpected cc 0x0c38 length: 249 > 2 Bluetooth: hci4: command 0x0409 tx timeout Bluetooth: hci1: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci7: command 0x0406 tx timeout Bluetooth: hci6: command 0x0406 tx timeout Bluetooth: hci5: command 0x0406 tx timeout Bluetooth: hci2: command 0x0406 tx timeout