program: r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r1 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r1, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r2 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r2, 0x400448c8, &(0x7f0000000340)={r1, r1, 0x8, 0x0, 0x0, 0xb, 0x1, 0x46d, 0xfff9, 0x3, 0x0, 0x8, 'syz0\x00'}) ioctl$sock_bt_hidp_HIDPCONNADD(r2, 0x400448c8, &(0x7f0000001400)={r1, r1, 0x5, 0x0, 0x0, 0x1, 0x4, 0x97d4, 0x101, 0x8, 0x0, 0x7, 'syz0\x00'}) ioctl$sock_bt_hci(r0, 0x400448cb, 0x0) r3 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r3, 0x400448cb, 0x0) openat$snapshot(0xffffffffffffff9c, &(0x7f00000002c0), 0x40040, 0x0) [ 86.548897][ T9] cfg80211: failed to load regulatory.db [ 86.606845][ T5330] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.652901][ T5330] [ 86.653948][ T5330] ====================================================== [ 86.656892][ T5330] WARNING: possible circular locking dependency detected [ 86.659867][ T5330] syzkaller #0 Not tainted [ 86.661806][ T5330] ------------------------------------------------------ [ 86.664637][ T5330] syz.0.0/5330 is trying to acquire lock: [ 86.666925][ T5330] ffff888043ab5040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.671523][ T5330] [ 86.671523][ T5330] but task is already holding lock: [ 86.674419][ T5330] ffff888043ab5338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.678000][ T5330] [ 86.678000][ T5330] which lock already depends on the new lock. [ 86.678000][ T5330] [ 86.682123][ T5330] [ 86.682123][ T5330] the existing dependency chain (in reverse order) is: [ 86.686051][ T5330] [ 86.686051][ T5330] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.689153][ T5330] lock_acquire+0x120/0x360 [ 86.690932][ T5330] __mutex_lock+0x187/0x1350 [ 86.693158][ T5330] l2cap_info_timeout+0x60/0xa0 [ 86.695475][ T5330] process_scheduled_works+0xae1/0x17b0 [ 86.697960][ T5330] worker_thread+0x8a0/0xda0 [ 86.699966][ T5330] kthread+0x711/0x8a0 [ 86.701860][ T5330] ret_from_fork+0x4bc/0x870 [ 86.703939][ T5330] ret_from_fork_asm+0x1a/0x30 [ 86.706053][ T5330] [ 86.706053][ T5330] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.710508][ T5330] validate_chain+0xb9b/0x2140 [ 86.713148][ T5330] __lock_acquire+0xab9/0xd20 [ 86.715496][ T5330] lock_acquire+0x120/0x360 [ 86.717839][ T5330] __flush_work+0x6b8/0xbc0 [ 86.720419][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.723300][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.725680][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.727912][ T5330] hci_dev_reset+0x44b/0x6b0 [ 86.730003][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.731968][ T5330] sock_ioctl+0x576/0x790 [ 86.733677][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.735778][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.737825][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.740618][ T5330] [ 86.740618][ T5330] other info that might help us debug this: [ 86.740618][ T5330] [ 86.744386][ T5330] Possible unsafe locking scenario: [ 86.744386][ T5330] [ 86.746974][ T5330] CPU0 CPU1 [ 86.748986][ T5330] ---- ---- [ 86.750907][ T5330] lock(&conn->lock#2); [ 86.752561][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.756302][ T5330] lock(&conn->lock#2); [ 86.759046][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.761842][ T5330] [ 86.761842][ T5330] *** DEADLOCK *** [ 86.761842][ T5330] [ 86.765086][ T5330] 6 locks held by syz.0.0/5330: [ 86.767010][ T5330] #0: ffff888043950020 (&hdev->srcu){.+.+}-{0:0}, at: __hci_dev_get+0x103/0x220 [ 86.770733][ T5330] #1: ffff888043950dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_reset+0x17a/0x6b0 [ 86.774818][ T5330] #2: ffff8880439500b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_reset+0x211/0x6b0 [ 86.778762][ T5330] #3: ffffffff8f64af28 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.783078][ T5330] #4: ffff888043ab5338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.787199][ T5330] #5: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.791210][ T5330] [ 86.791210][ T5330] stack backtrace: [ 86.793536][ T5330] CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.793548][ T5330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.793554][ T5330] Call Trace: [ 86.793559][ T5330] [ 86.793565][ T5330] dump_stack_lvl+0x189/0x250 [ 86.793577][ T5330] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.793587][ T5330] ? __pfx__printk+0x10/0x10 [ 86.793596][ T5330] ? print_lock_name+0xde/0x100 [ 86.793604][ T5330] print_circular_bug+0x2ee/0x310 [ 86.793619][ T5330] check_noncircular+0x134/0x160 [ 86.793635][ T5330] validate_chain+0xb9b/0x2140 [ 86.793646][ T5330] ? do_raw_spin_lock+0x121/0x290 [ 86.793660][ T5330] ? look_up_lock_class+0x74/0x170 [ 86.793666][ T5330] ? register_lock_class+0x51/0x320 [ 86.793675][ T5330] __lock_acquire+0xab9/0xd20 [ 86.793691][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.793700][ T5330] lock_acquire+0x120/0x360 [ 86.793711][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.793720][ T5330] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.793733][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.793741][ T5330] __flush_work+0x6b8/0xbc0 [ 86.793749][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.793754][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.793760][ T5330] ? __pfx___flush_work+0x10/0x10 [ 86.793766][ T5330] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.793776][ T5330] ? __pfx___cancel_work+0x10/0x10 [ 86.793782][ T5330] ? hci_conn_drop+0x14d/0x280 [ 86.793791][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.793798][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.793805][ T5330] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.793812][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.793820][ T5330] hci_dev_reset+0x44b/0x6b0 [ 86.793828][ T5330] ? hci_sock_ioctl+0x5b7/0x910 [ 86.793835][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.793842][ T5330] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.793850][ T5330] sock_ioctl+0x576/0x790 [ 86.793856][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.793862][ T5330] ? __fget_files+0x3a0/0x420 [ 86.793869][ T5330] ? __fget_files+0x2a/0x420 [ 86.793875][ T5330] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.793883][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.793888][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.793898][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.793905][ T5330] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.793916][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.793923][ T5330] ? clear_bhb_loop+0x60/0xb0 [ 86.793930][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.793936][ T5330] RIP: 0033:0x7fa6d718eec9 [ 86.793944][ T5330] 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 [ 86.793950][ T5330] RSP: 002b:00007fa6d7f80038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.793958][ T5330] RAX: ffffffffffffffda RBX: 00007fa6d73e5fa0 RCX: 00007fa6d718eec9 [ 86.793963][ T5330] RDX: 0000000000000000 RSI: 00000000400448cb RDI: 0000000000000004 [ 86.793967][ T5330] RBP: 00007fa6d7211f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.793971][ T5330] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.793974][ T5330] R13: 00007fa6d73e6038 R14: 00007fa6d73e5fa0 R15: 00007fff663f45a8 [ 86.793981][ T5330]