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, &(0x7f0000000280)={r0, r0, 0xc, 0x1, &(0x7f0000000340)='\x00', 0x9, 0x1, 0x457, 0x9, 0x9, 0x1, 0x1, 'syz1\x00'}) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r2, 0x400448ca, 0x0) [ 86.118257][ T5329] hid-multitouch 0005:0457:0009.0002: unknown main item tag 0x0 [ 86.133549][ T5329] hid-multitouch 0005:0457:0009.0002: hidraw1: BLUETOOTH HID v0.09 Device [syz1] on aa:aa:aa:aa:aa:aa [ 86.178111][ T5331] [ 86.179481][ T5331] ====================================================== [ 86.182886][ T5331] WARNING: possible circular locking dependency detected [ 86.185733][ T5331] syzkaller #0 Not tainted [ 86.187481][ T5331] ------------------------------------------------------ [ 86.190381][ T5331] syz.0.0/5331 is trying to acquire lock: [ 86.192453][ T5331] ffff888040d0c040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.197160][ T5331] [ 86.197160][ T5331] but task is already holding lock: [ 86.200441][ T5331] ffff888040d0c338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.204572][ T5331] [ 86.204572][ T5331] which lock already depends on the new lock. [ 86.204572][ T5331] [ 86.209291][ T5331] [ 86.209291][ T5331] the existing dependency chain (in reverse order) is: [ 86.213338][ T5331] [ 86.213338][ T5331] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.216609][ T5331] lock_acquire+0x120/0x360 [ 86.218807][ T5331] __mutex_lock+0x187/0x1350 [ 86.221112][ T5331] l2cap_info_timeout+0x60/0xa0 [ 86.223449][ T5331] process_scheduled_works+0xae1/0x17b0 [ 86.225907][ T5331] worker_thread+0x8a0/0xda0 [ 86.228040][ T5331] kthread+0x711/0x8a0 [ 86.229781][ T5331] ret_from_fork+0x4bc/0x870 [ 86.231835][ T5331] ret_from_fork_asm+0x1a/0x30 [ 86.233911][ T5331] [ 86.233911][ T5331] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.237847][ T5331] validate_chain+0xb9b/0x2140 [ 86.240054][ T5331] __lock_acquire+0xab9/0xd20 [ 86.241734][ T5331] lock_acquire+0x120/0x360 [ 86.243483][ T5331] __flush_work+0x6b8/0xbc0 [ 86.245467][ T5331] __cancel_work_sync+0xbe/0x110 [ 86.247556][ T5331] l2cap_conn_del+0x4f0/0x680 [ 86.249557][ T5331] hci_conn_hash_flush+0x10d/0x230 [ 86.251692][ T5331] hci_dev_close_sync+0xaef/0x1330 [ 86.253795][ T5331] hci_dev_close+0x108/0x200 [ 86.255922][ T5331] sock_do_ioctl+0xdc/0x300 [ 86.258054][ T5331] sock_ioctl+0x576/0x790 [ 86.260149][ T5331] __se_sys_ioctl+0xfc/0x170 [ 86.262505][ T5331] do_syscall_64+0xfa/0xfa0 [ 86.264765][ T5331] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.267560][ T5331] [ 86.267560][ T5331] other info that might help us debug this: [ 86.267560][ T5331] [ 86.272477][ T5331] Possible unsafe locking scenario: [ 86.272477][ T5331] [ 86.275841][ T5331] CPU0 CPU1 [ 86.278325][ T5331] ---- ---- [ 86.280745][ T5331] lock(&conn->lock#2); [ 86.282683][ T5331] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.286882][ T5331] lock(&conn->lock#2); [ 86.289877][ T5331] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.292795][ T5331] [ 86.292795][ T5331] *** DEADLOCK *** [ 86.292795][ T5331] [ 86.296277][ T5331] 5 locks held by syz.0.0/5331: [ 86.298447][ T5331] #0: ffff888032fecdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.302735][ T5331] #1: ffff888032fec0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.306980][ T5331] #2: ffffffff8f437268 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.311248][ T5331] #3: ffff888040d0c338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.315163][ T5331] #4: ffffffff8df3d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.318926][ T5331] [ 86.318926][ T5331] stack backtrace: [ 86.321425][ T5331] CPU: 0 UID: 0 PID: 5331 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.321441][ T5331] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.321448][ T5331] Call Trace: [ 86.321463][ T5331] [ 86.321471][ T5331] dump_stack_lvl+0x189/0x250 [ 86.321492][ T5331] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.321507][ T5331] ? __pfx__printk+0x10/0x10 [ 86.321518][ T5331] ? print_lock_name+0xde/0x100 [ 86.321528][ T5331] print_circular_bug+0x2ee/0x310 [ 86.321543][ T5331] check_noncircular+0x134/0x160 [ 86.321557][ T5331] validate_chain+0xb9b/0x2140 [ 86.321569][ T5331] ? do_raw_spin_lock+0x121/0x290 [ 86.321584][ T5331] ? look_up_lock_class+0x74/0x170 [ 86.321596][ T5331] ? register_lock_class+0x51/0x320 [ 86.321606][ T5331] __lock_acquire+0xab9/0xd20 [ 86.321618][ T5331] ? __flush_work+0xd2/0xbc0 [ 86.321629][ T5331] lock_acquire+0x120/0x360 [ 86.321637][ T5331] ? __flush_work+0xd2/0xbc0 [ 86.321649][ T5331] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.321661][ T5331] ? __flush_work+0xd2/0xbc0 [ 86.321673][ T5331] __flush_work+0x6b8/0xbc0 [ 86.321683][ T5331] ? __flush_work+0xd2/0xbc0 [ 86.321695][ T5331] ? __flush_work+0xd2/0xbc0 [ 86.321707][ T5331] ? __pfx___flush_work+0x10/0x10 [ 86.321718][ T5331] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.321731][ T5331] ? __pfx___cancel_work+0x10/0x10 [ 86.321743][ T5331] ? hci_conn_drop+0x14d/0x280 [ 86.321755][ T5331] __cancel_work_sync+0xbe/0x110 [ 86.321767][ T5331] l2cap_conn_del+0x4f0/0x680 [ 86.321784][ T5331] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.321799][ T5331] hci_conn_hash_flush+0x10d/0x230 [ 86.321815][ T5331] hci_dev_close_sync+0xaef/0x1330 [ 86.321830][ T5331] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.321843][ T5331] ? do_raw_read_unlock+0x3d/0x80 [ 86.321858][ T5331] hci_dev_close+0x108/0x200 [ 86.321871][ T5331] sock_do_ioctl+0xdc/0x300 [ 86.321883][ T5331] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.321896][ T5331] sock_ioctl+0x576/0x790 [ 86.321907][ T5331] ? __pfx_sock_ioctl+0x10/0x10 [ 86.321917][ T5331] ? __fget_files+0x3a0/0x420 [ 86.321932][ T5331] ? __fget_files+0x2a/0x420 [ 86.321946][ T5331] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.321956][ T5331] ? __pfx_sock_ioctl+0x10/0x10 [ 86.321965][ T5331] __se_sys_ioctl+0xfc/0x170 [ 86.321977][ T5331] do_syscall_64+0xfa/0xfa0 [ 86.321989][ T5331] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.322001][ T5331] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.322011][ T5331] ? clear_bhb_loop+0x60/0xb0 [ 86.322022][ T5331] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.322031][ T5331] RIP: 0033:0x7f203258efc9 [ 86.322040][ T5331] 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.322046][ T5331] RSP: 002b:00007f2033493038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.322057][ T5331] RAX: ffffffffffffffda RBX: 00007f20327e5fa0 RCX: 00007f203258efc9 [ 86.322064][ T5331] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 86.322069][ T5331] RBP: 00007f2032611f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.322075][ T5331] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.322080][ T5331] R13: 00007f20327e6038 R14: 00007f20327e5fa0 R15: 00007fff13e727b8 [ 86.322091][ T5331] [ 86.498573][ T4672] Bluetooth: hci0: command tx timeout [ 86.522397][ T5335] fido_id[5335]: Failed to open report descriptor at '/sys/devices/virtual/bluetooth/hci0/hci0:200/report_descriptor': No such file or directory [ 86.733776][ T10] cfg80211: failed to load regulatory.db [ 88.570740][ T4672] Bluetooth: hci0: command tx timeout [ 90.650674][ T4672] Bluetooth: hci0: command tx timeout