program: r0 = syz_open_dev$usbfs(&(0x7f0000000140), 0x75, 0x101181) accept4$rose(0xffffffffffffffff, &(0x7f0000000040)=@full={0xb, @remote, @netrom, 0x0, [@default, @rose, @netrom, @rose, @null, @default]}, &(0x7f0000000080)=0x40, 0x800) r1 = socket(0x22, 0x2, 0x10) r2 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r2, &(0x7f0000000000)={0x1f, 0x8ef, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}}, 0xe) r3 = syz_init_net_socket$bt_bnep(0x1f, 0x3, 0x4) ioctl$sock_bt_bnep_BNEPCONNADD(r3, 0x400442c8, &(0x7f00000001c0)={r2, 0x1, 0x2}) ioctl$sock_bt_bnep_BNEPGETCONNLIST(r3, 0x800442d2, &(0x7f0000000180)={0x1, &(0x7f0000000100)=[{0x0, 0x0, 0x0, @remote}]}) r4 = socket$alg(0x26, 0x5, 0x0) bind$alg(r4, &(0x7f0000000000)={0x26, 'skcipher\x00', 0x0, 0x0, 'cbc-twofish-3way\x00'}, 0x58) setsockopt$ALG_SET_KEY(r4, 0x117, 0x1, &(0x7f0000c18000)="ad56b6c5910fae9d6dcd3292ea54c7b6", 0x10) r5 = accept4(r4, 0x0, 0x0, 0x0) sendmmsg$alg(r5, &(0x7f0000000e00)=[{0x0, 0x0, 0x0}], 0x1, 0x0) recvmsg(r5, &(0x7f0000001400)={0x0, 0x0, &(0x7f0000000180)=[{&(0x7f0000000280)=""/192, 0xc0}], 0x1}, 0x0) ioctl$IMGETVERSION(r1, 0x80044942, &(0x7f00000000c0)) getsockopt$sock_buf(r1, 0x1, 0x37, &(0x7f0000000180)=""/190, &(0x7f0000000240)=0xbe) r6 = openat$kvm(0xffffffffffffff9c, &(0x7f0000000040), 0x22000, 0x0) openat$snapshot(0xffffffffffffff9c, &(0x7f0000000340), 0x6080, 0x0) mmap(&(0x7f0000ffc000/0x4000)=nil, 0x4000, 0x1, 0x4010, r6, 0xc3094000) ioctl$KVM_GET_SUPPORTED_CPUID(r6, 0xc004ae0a, &(0x7f0000000180)={0x66666666666687f}) ioctl$USBDEVFS_CONTROL(r0, 0xc0105500, &(0x7f0000000000)={0x80, 0x6, 0x301, 0xfffe, 0x0, 0x0, 0x0}) socket$unix(0x1, 0x1, 0x0) r7 = syz_open_procfs(0xffffffffffffffff, &(0x7f0000000000)='fdinfo/3\x00') read$FUSE(r7, &(0x7f0000002140)={0x2020}, 0x2020) accept$inet(r7, 0x0, &(0x7f0000000300)) r8 = syz_open_dev$evdev(&(0x7f0000000100), 0x9, 0x2) ioctl$EVIOCGABS2F(r8, 0x8018456f, &(0x7f0000000280)=""/77) [ 127.732210][ T47] Bluetooth: hci0: command tx timeout [ 128.622128][ T5341] delete_channel: no stack [ 128.627127][ T5342] Bluetooth: hci0: Opcode 0x0c1a failed: -4 [ 128.630544][ T5342] Bluetooth: hci0: Opcode 0x0406 failed: -4 [ 128.676024][ T5342] [ 128.677050][ T5342] ====================================================== [ 128.679884][ T5342] WARNING: possible circular locking dependency detected [ 128.682651][ T5342] syzkaller #0 Not tainted [ 128.684456][ T5342] ------------------------------------------------------ [ 128.687185][ T5342] syz.0.0/5342 is trying to acquire lock: [ 128.689472][ T5342] ffff8880401a3840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 128.694586][ T5342] [ 128.694586][ T5342] but task is already holding lock: [ 128.697895][ T5342] ffff8880401a3b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 128.701764][ T5342] [ 128.701764][ T5342] which lock already depends on the new lock. [ 128.701764][ T5342] [ 128.705898][ T5342] [ 128.705898][ T5342] the existing dependency chain (in reverse order) is: [ 128.709742][ T5342] [ 128.709742][ T5342] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 128.712974][ T5342] __mutex_lock+0x187/0x1350 [ 128.715217][ T5342] l2cap_info_timeout+0x60/0xa0 [ 128.717699][ T5342] process_scheduled_works+0xad1/0x1770 [ 128.720354][ T5342] worker_thread+0x8a0/0xda0 [ 128.722438][ T5342] kthread+0x711/0x8a0 [ 128.724367][ T5342] ret_from_fork+0x510/0xa50 [ 128.726521][ T5342] ret_from_fork_asm+0x1a/0x30 [ 128.728781][ T5342] [ 128.728781][ T5342] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 128.733076][ T5342] __lock_acquire+0x15a6/0x2cf0 [ 128.735395][ T5342] lock_acquire+0x107/0x340 [ 128.737562][ T5342] __flush_work+0x6b8/0xbc0 [ 128.739619][ T5342] __cancel_work_sync+0xbe/0x110 [ 128.742067][ T5342] l2cap_conn_del+0x402/0x5b0 [ 128.744339][ T5342] l2cap_connect_cfm+0x122/0x10e0 [ 128.746811][ T5342] hci_conn_failed+0x1ce/0x340 [ 128.749138][ T5342] hci_abort_conn_sync+0x658/0xe30 [ 128.751597][ T5342] hci_disconnect_all_sync+0x1b5/0x350 [ 128.754214][ T5342] hci_suspend_sync+0x3fc/0xc90 [ 128.756569][ T5342] hci_suspend_dev+0x28d/0x530 [ 128.758763][ T5342] hci_suspend_notifier+0xf2/0x2f0 [ 128.761158][ T5342] notifier_call_chain+0x19d/0x3a0 [ 128.763528][ T5342] blocking_notifier_call_chain_robust+0x85/0x100 [ 128.766171][ T5342] pm_notifier_call_chain_robust+0x2c/0x60 [ 128.768899][ T5342] snapshot_open+0x19c/0x280 [ 128.770948][ T5342] misc_open+0x2d5/0x350 [ 128.772893][ T5342] chrdev_open+0x4cc/0x5e0 [ 128.775175][ T5342] do_dentry_open+0x7ce/0x1420 [ 128.777369][ T5342] vfs_open+0x3b/0x340 [ 128.779357][ T5342] path_openat+0x340e/0x3dd0 [ 128.781489][ T5342] do_filp_open+0x1fa/0x410 [ 128.783701][ T5342] do_sys_openat2+0x121/0x200 [ 128.786009][ T5342] __x64_sys_openat+0x138/0x170 [ 128.788342][ T5342] do_syscall_64+0xec/0xf80 [ 128.790495][ T5342] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 128.793139][ T5342] [ 128.793139][ T5342] other info that might help us debug this: [ 128.793139][ T5342] [ 128.797093][ T5342] Possible unsafe locking scenario: [ 128.797093][ T5342] [ 128.800137][ T5342] CPU0 CPU1 [ 128.802201][ T5342] ---- ---- [ 128.804467][ T5342] lock(&conn->lock#2); [ 128.806423][ T5342] lock((work_completion)(&(&conn->info_timer)->work)); [ 128.810318][ T5342] lock(&conn->lock#2); [ 128.813189][ T5342] lock((work_completion)(&(&conn->info_timer)->work)); [ 128.816272][ T5342] [ 128.816272][ T5342] *** DEADLOCK *** [ 128.816272][ T5342] [ 128.819654][ T5342] 8 locks held by syz.0.0/5342: [ 128.821839][ T5342] #0: ffffffff8e7a1ae8 (misc_mtx){+.+.}-{4:4}, at: misc_open+0x51/0x350 [ 128.825505][ T5342] #1: ffffffff8ddf09a8 (system_transition_mutex){+.+.}-{4:4}, at: lock_system_sleep+0x4a/0x70 [ 128.831167][ T5342] #2: ffffffff8de14770 ((pm_chain_head).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain_robust+0x65/0x100 [ 128.836122][ T5342] #3: ffff88801142cec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_suspend_dev+0x285/0x530 [ 128.840147][ T5342] #4: ffff88801142c0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_abort_conn_sync+0x242/0xe30 [ 128.843907][ T5342] #5: ffffffff8f4859c8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_failed+0x165/0x340 [ 128.847759][ T5342] #6: ffff8880401a3b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 128.851540][ T5342] #7: ffffffff8df41aa0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 128.855437][ T5342] [ 128.855437][ T5342] stack backtrace: [ 128.857888][ T5342] CPU: 0 UID: 0 PID: 5342 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 128.857905][ T5342] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 128.857912][ T5342] Call Trace: [ 128.857920][ T5342] [ 128.857928][ T5342] dump_stack_lvl+0xe8/0x150 [ 128.857948][ T5342] print_circular_bug+0x2e2/0x300 [ 128.857964][ T5342] check_noncircular+0x12e/0x150 [ 128.857980][ T5342] __lock_acquire+0x15a6/0x2cf0 [ 128.857993][ T5342] ? do_raw_spin_lock+0x121/0x290 [ 128.858011][ T5342] ? __flush_work+0xd2/0xbc0 [ 128.858021][ T5342] lock_acquire+0x107/0x340 [ 128.858030][ T5342] ? __flush_work+0xd2/0xbc0 [ 128.858042][ T5342] ? __flush_work+0xd2/0xbc0 [ 128.858053][ T5342] __flush_work+0x6b8/0xbc0 [ 128.858065][ T5342] ? __flush_work+0xd2/0xbc0 [ 128.858076][ T5342] ? __flush_work+0xd2/0xbc0 [ 128.858088][ T5342] ? __pfx___flush_work+0x10/0x10 [ 128.858097][ T5342] ? __pfx_wq_barrier_func+0x10/0x10 [ 128.858107][ T5342] ? __cancel_work_sync+0x5c/0x110 [ 128.858114][ T5342] __cancel_work_sync+0xbe/0x110 [ 128.858121][ T5342] l2cap_conn_del+0x402/0x5b0 [ 128.858141][ T5342] l2cap_connect_cfm+0x122/0x10e0 [ 128.858156][ T5342] ? __pfx_l2cap_connect_cfm+0x10/0x10 [ 128.858169][ T5342] ? __pfx_l2cap_connect_cfm+0x10/0x10 [ 128.858181][ T5342] hci_conn_failed+0x1ce/0x340 [ 128.858193][ T5342] ? hci_abort_conn_sync+0x24e/0xe30 [ 128.858204][ T5342] hci_abort_conn_sync+0x658/0xe30 [ 128.858219][ T5342] ? __pfx_hci_abort_conn_sync+0x10/0x10 [ 128.858234][ T5342] ? hci_disconnect_all_sync+0x2e/0x350 [ 128.858248][ T5342] ? hci_disconnect_all_sync+0x2e/0x350 [ 128.858261][ T5342] ? hci_disconnect_all_sync+0x2e/0x350 [ 128.858275][ T5342] hci_disconnect_all_sync+0x1b5/0x350 [ 128.858285][ T5342] hci_suspend_sync+0x3fc/0xc90 [ 128.858294][ T5342] ? __pfx___mutex_lock+0x10/0x10 [ 128.858303][ T5342] ? __pfx_hci_suspend_sync+0x10/0x10 [ 128.858315][ T5342] ? lockdep_hardirqs_on+0x7b/0x110 [ 128.858324][ T5342] ? enable_work+0x1e9/0x220 [ 128.858334][ T5342] ? hci_cmd_sync_cancel_sync+0xc9/0x1c0 [ 128.858345][ T5342] hci_suspend_dev+0x28d/0x530 [ 128.858356][ T5342] ? __pfx_hci_suspend_dev+0x10/0x10 [ 128.858366][ T5342] ? rcu_barrier+0x474/0x570 [ 128.858382][ T5342] hci_suspend_notifier+0xf2/0x2f0 [ 128.858392][ T5342] notifier_call_chain+0x19d/0x3a0 [ 128.858405][ T5342] blocking_notifier_call_chain_robust+0x85/0x100 [ 128.858418][ T5342] pm_notifier_call_chain_robust+0x2c/0x60 [ 128.858428][ T5342] snapshot_open+0x19c/0x280 [ 128.858438][ T5342] ? __pfx_snapshot_open+0x10/0x10 [ 128.858448][ T5342] misc_open+0x2d5/0x350 [ 128.858460][ T5342] chrdev_open+0x4cc/0x5e0 [ 128.858471][ T5342] ? __pfx_chrdev_open+0x10/0x10 [ 128.858480][ T5342] ? fsnotify_open_perm_and_set_mode+0x113/0x610 [ 128.858494][ T5342] ? __pfx_chrdev_open+0x10/0x10 [ 128.858501][ T5342] do_dentry_open+0x7ce/0x1420 [ 128.858515][ T5342] vfs_open+0x3b/0x340 [ 128.858525][ T5342] ? path_openat+0x33f3/0x3dd0 [ 128.858537][ T5342] path_openat+0x340e/0x3dd0 [ 128.858552][ T5342] ? __pfx_stack_trace_save+0x10/0x10 [ 128.858569][ T5342] ? kmem_cache_alloc_noprof+0x37d/0x710 [ 128.858583][ T5342] ? getname_flags+0xb8/0x540 [ 128.858592][ T5342] ? __pfx_path_openat+0x10/0x10 [ 128.858605][ T5342] ? __lock_acquire+0x6b6/0x2cf0 [ 128.858616][ T5342] do_filp_open+0x1fa/0x410 [ 128.858629][ T5342] ? __pfx_do_filp_open+0x10/0x10 [ 128.858646][ T5342] ? _raw_spin_unlock+0x28/0x50 [ 128.858658][ T5342] ? alloc_fd+0x64c/0x6c0 [ 128.858670][ T5342] do_sys_openat2+0x121/0x200 [ 128.858680][ T5342] ? __se_sys_futex+0x36f/0x400 [ 128.858690][ T5342] ? __pfx_do_sys_openat2+0x10/0x10 [ 128.858701][ T5342] ? rcu_is_watching+0x15/0xb0 [ 128.858714][ T5342] __x64_sys_openat+0x138/0x170 [ 128.858725][ T5342] do_syscall_64+0xec/0xf80 [ 128.858735][ T5342] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 128.858745][ T5342] ? trace_irq_disable+0x37/0x100 [ 128.858758][ T5342] ? clear_bhb_loop+0x60/0xb0 [ 128.858769][ T5342] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 128.858779][ T5342] RIP: 0033:0x7fed10d8f7c9 [ 128.858792][ T5342] Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 [ 128.858798][ T5342] RSP: 002b:00007fed11cd4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 128.858809][ T5342] RAX: ffffffffffffffda RBX: 00007fed10fe5fa0 RCX: 00007fed10d8f7c9 [ 128.858816][ T5342] RDX: 0000000000006080 RSI: 0000200000000340 RDI: ffffffffffffff9c [ 128.858823][ T5342] RBP: 00007fed10e13f91 R08: 0000000000000000 R09: 0000000000000000 [ 128.858829][ T5342] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 128.858835][ T5342] R13: 00007fed10fe6038 R14: 00007fed10fe5fa0 R15: 00007ffcd5a03b48 [ 128.858846][ T5342] [ 129.935646][ T4678] Bluetooth: hci0: command 0x040f tx timeout [ 132.016290][ T4678] Bluetooth: hci0: command 0x040f tx timeout [ 134.095593][ T4678] Bluetooth: hci0: command 0x040f tx timeout