program: r0 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r0, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r1 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r1, 0x400448c8, &(0x7f00000000c0)={r0, r0, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r2, 0x400448ca, 0x0) [ 86.656286][ T5329] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.782928][ T5329] [ 86.783956][ T5329] ====================================================== [ 86.786658][ T5329] WARNING: possible circular locking dependency detected [ 86.789340][ T5329] syzkaller #0 Not tainted [ 86.791285][ T5329] ------------------------------------------------------ [ 86.794262][ T5329] syz.0.0/5329 is trying to acquire lock: [ 86.796704][ T5329] ffff888043786040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.801724][ T5329] [ 86.801724][ T5329] but task is already holding lock: [ 86.804855][ T5329] ffff888043786338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.808819][ T5329] [ 86.808819][ T5329] which lock already depends on the new lock. [ 86.808819][ T5329] [ 86.813221][ T5329] [ 86.813221][ T5329] the existing dependency chain (in reverse order) is: [ 86.817051][ T5329] [ 86.817051][ T5329] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.820285][ T5329] lock_acquire+0x120/0x360 [ 86.822428][ T5329] __mutex_lock+0x187/0x1350 [ 86.824588][ T5329] l2cap_info_timeout+0x60/0xa0 [ 86.826901][ T5329] process_scheduled_works+0xae1/0x17b0 [ 86.829485][ T5329] worker_thread+0x8a0/0xda0 [ 86.831747][ T5329] kthread+0x711/0x8a0 [ 86.833937][ T5329] ret_from_fork+0x4bc/0x870 [ 86.836145][ T5329] ret_from_fork_asm+0x1a/0x30 [ 86.838474][ T5329] [ 86.838474][ T5329] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.842984][ T5329] validate_chain+0xb9b/0x2140 [ 86.845304][ T5329] __lock_acquire+0xab9/0xd20 [ 86.847639][ T5329] lock_acquire+0x120/0x360 [ 86.849845][ T5329] __flush_work+0x6b8/0xbc0 [ 86.852027][ T5329] __cancel_work_sync+0xbe/0x110 [ 86.854427][ T5329] l2cap_conn_del+0x4f0/0x680 [ 86.856679][ T5329] hci_conn_hash_flush+0x10d/0x230 [ 86.859152][ T5329] hci_dev_close_sync+0xaef/0x1330 [ 86.861587][ T5329] hci_dev_close+0x108/0x200 [ 86.863766][ T5329] sock_do_ioctl+0xdc/0x300 [ 86.865999][ T5329] sock_ioctl+0x576/0x790 [ 86.868147][ T5329] __se_sys_ioctl+0xfc/0x170 [ 86.870401][ T5329] do_syscall_64+0xfa/0xfa0 [ 86.872659][ T5329] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.875439][ T5329] [ 86.875439][ T5329] other info that might help us debug this: [ 86.875439][ T5329] [ 86.879801][ T5329] Possible unsafe locking scenario: [ 86.879801][ T5329] [ 86.883133][ T5329] CPU0 CPU1 [ 86.885458][ T5329] ---- ---- [ 86.887802][ T5329] lock(&conn->lock#2); [ 86.889691][ T5329] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.893806][ T5329] lock(&conn->lock#2); [ 86.896754][ T5329] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.899639][ T5329] [ 86.899639][ T5329] *** DEADLOCK *** [ 86.899639][ T5329] [ 86.903171][ T5329] 5 locks held by syz.0.0/5329: [ 86.905363][ T5329] #0: ffff88800060cdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.909492][ T5329] #1: ffff88800060c0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.913800][ T5329] #2: ffffffff8f64afa8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.918248][ T5329] #3: ffff888043786338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.922197][ T5329] #4: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.926138][ T5329] [ 86.926138][ T5329] stack backtrace: [ 86.928742][ T5329] CPU: 0 UID: 0 PID: 5329 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.928758][ T5329] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.928765][ T5329] Call Trace: [ 86.928773][ T5329] [ 86.928778][ T5329] dump_stack_lvl+0x189/0x250 [ 86.928794][ T5329] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.928806][ T5329] ? __pfx__printk+0x10/0x10 [ 86.928819][ T5329] ? print_lock_name+0xde/0x100 [ 86.928832][ T5329] print_circular_bug+0x2ee/0x310 [ 86.928849][ T5329] check_noncircular+0x134/0x160 [ 86.928865][ T5329] validate_chain+0xb9b/0x2140 [ 86.928880][ T5329] ? do_raw_spin_lock+0x121/0x290 [ 86.928892][ T5329] ? look_up_lock_class+0x74/0x170 [ 86.928908][ T5329] ? register_lock_class+0x51/0x320 [ 86.928921][ T5329] __lock_acquire+0xab9/0xd20 [ 86.928935][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.928956][ T5329] lock_acquire+0x120/0x360 [ 86.928969][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.928981][ T5329] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.928997][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.929005][ T5329] __flush_work+0x6b8/0xbc0 [ 86.929014][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.929022][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.929031][ T5329] ? __pfx___flush_work+0x10/0x10 [ 86.929040][ T5329] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.929055][ T5329] ? __pfx___cancel_work+0x10/0x10 [ 86.929065][ T5329] ? hci_conn_drop+0x14d/0x280 [ 86.929079][ T5329] __cancel_work_sync+0xbe/0x110 [ 86.929090][ T5329] l2cap_conn_del+0x4f0/0x680 [ 86.929103][ T5329] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.929116][ T5329] hci_conn_hash_flush+0x10d/0x230 [ 86.929129][ T5329] hci_dev_close_sync+0xaef/0x1330 [ 86.929141][ T5329] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.929151][ T5329] ? do_raw_read_unlock+0x3d/0x80 [ 86.929163][ T5329] hci_dev_close+0x108/0x200 [ 86.929173][ T5329] sock_do_ioctl+0xdc/0x300 [ 86.929183][ T5329] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.929195][ T5329] sock_ioctl+0x576/0x790 [ 86.929206][ T5329] ? __pfx_sock_ioctl+0x10/0x10 [ 86.929215][ T5329] ? __fget_files+0x3a0/0x420 [ 86.929226][ T5329] ? __fget_files+0x2a/0x420 [ 86.929237][ T5329] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.929250][ T5329] ? __pfx_sock_ioctl+0x10/0x10 [ 86.929259][ T5329] __se_sys_ioctl+0xfc/0x170 [ 86.929274][ T5329] do_syscall_64+0xfa/0xfa0 [ 86.929283][ T5329] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.929296][ T5329] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.929312][ T5329] ? clear_bhb_loop+0x60/0xb0 [ 86.929323][ T5329] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.929334][ T5329] RIP: 0033:0x7f3da918eec9 [ 86.929345][ T5329] 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.929354][ T5329] RSP: 002b:00007f3da55f5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.929366][ T5329] RAX: ffffffffffffffda RBX: 00007f3da93e5fa0 RCX: 00007f3da918eec9 [ 86.929374][ T5329] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 86.929381][ T5329] RBP: 00007f3da9211f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.929388][ T5329] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.929395][ T5329] R13: 00007f3da93e6038 R14: 00007f3da93e5fa0 R15: 00007ffcc3344ee8 [ 86.929406][ T5329] [ 87.087385][ T4670] Bluetooth: hci0: command tx timeout [ 89.168363][ T4670] Bluetooth: hci0: command tx timeout [ 91.248255][ T4670] Bluetooth: hci0: command tx timeout [ 91.728248][ T10] cfg80211: failed to load regulatory.db