loop7: detected capacity change from 0 to 264192 FAT-fs (loop7): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) ====================================================== WARNING: possible circular locking dependency detected 6.1.0-next-20221214 #1 Not tainted ------------------------------------------------------ syz-executor.1/15410 is trying to acquire lock: ffff88800ee2b070 ((work_completion)(&(&conn->timeout_work)->work)){+.+.}-{0:0}, at: __flush_work+0xdd/0xd00 but task is already holding lock: ffffffff85be3e68 (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: -> #3 (hci_cb_list_lock){+.+.}-{3:3}: __mutex_lock+0x136/0x14e0 hci_connect_cfm+0x26/0x140 hci_remote_features_evt+0x478/0x870 hci_event_packet+0x91d/0xf60 hci_rx_work+0xa86/0x1000 process_one_work+0xa0f/0x1690 worker_thread+0x63b/0x1260 kthread+0x2f1/0x3a0 ret_from_fork+0x2c/0x50 -> #2 (&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 -> #1 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: lock_sock_nested+0x41/0xf0 sco_sock_timeout+0xc7/0x230 process_one_work+0xa0f/0x1690 worker_thread+0x63b/0x1260 kthread+0x2f1/0x3a0 ret_from_fork+0x2c/0x50 -> #0 ((work_completion)(&(&conn->timeout_work)->work)){+.+.}-{0:0}: __lock_acquire+0x2a02/0x5e70 lock_acquire.part.0+0x11e/0x340 __flush_work+0x109/0xd00 __cancel_work_timer+0x39c/0x4e0 sco_conn_del+0x1e4/0x2c0 sco_disconn_cfm+0x66/0x80 hci_conn_hash_flush+0x11d/0x230 hci_dev_close_sync+0x57f/0xff0 hci_unregister_dev+0x15e/0x410 vhci_release+0x80/0x100 __fput+0x263/0xa40 task_work_run+0x174/0x280 do_exit+0xaad/0x2760 do_group_exit+0xd4/0x2a0 get_signal+0x21b7/0x22f0 arch_do_signal_or_restart+0x79/0x5a0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x1d/0x50 do_syscall_64+0x4c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc other info that might help us debug this: Chain exists of: (work_completion)(&(&conn->timeout_work)->work) --> &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((work_completion)(&(&conn->timeout_work)->work)); *** DEADLOCK *** 3 locks held by syz-executor.1/15410: #0: ffff888020fb9028 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x156/0x410 #1: ffff888020fb8078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x2e4/0xff0 #2: ffffffff85be3e68 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xcb/0x230 stack backtrace: CPU: 1 PID: 15410 Comm: syz-executor.1 Not tainted 6.1.0-next-20221214 #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.part.0+0x11e/0x340 __flush_work+0x109/0xd00 __cancel_work_timer+0x39c/0x4e0 sco_conn_del+0x1e4/0x2c0 sco_disconn_cfm+0x66/0x80 hci_conn_hash_flush+0x11d/0x230 hci_dev_close_sync+0x57f/0xff0 hci_unregister_dev+0x15e/0x410 vhci_release+0x80/0x100 __fput+0x263/0xa40 task_work_run+0x174/0x280 do_exit+0xaad/0x2760 do_group_exit+0xd4/0x2a0 get_signal+0x21b7/0x22f0 arch_do_signal_or_restart+0x79/0x5a0 exit_to_user_mode_prepare+0x131/0x1a0 syscall_exit_to_user_mode+0x1d/0x50 do_syscall_64+0x4c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f6d6fc6fb19 Code: Unable to access opcode bytes at 0x7f6d6fc6faef. RSP: 002b:00007f6d6d1e5218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f6d6fd82f68 RCX: 00007f6d6fc6fb19 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f6d6fd82f68 RBP: 00007f6d6fd82f60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6d6fd82f6c R13: 00007ffc0546f62f R14: 00007f6d6d1e5300 R15: 0000000000022000 Bluetooth: hci0: unexpected cc 0x0c03 length: 249 > 1 Bluetooth: hci0: unexpected cc 0x1003 length: 249 > 9 Bluetooth: hci0: unexpected cc 0x1001 length: 249 > 9 Bluetooth: hci0: unexpected cc 0x0c23 length: 249 > 4 Bluetooth: hci0: unexpected cc 0x0c25 length: 249 > 3 Bluetooth: hci0: unexpected cc 0x0c38 length: 249 > 2 Bluetooth: hci0: command 0x0409 tx timeout Bluetooth: hci0: command 0x041b tx timeout Bluetooth: hci0: command 0x040f tx timeout