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, 0x0, 0x0, 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) [ 85.264045][ T5336] Bluetooth: hci0: command tx timeout [ 85.387018][ T5361] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.789812][ T5362] [ 85.791446][ T5362] ====================================================== [ 85.796692][ T5362] WARNING: possible circular locking dependency detected [ 85.803145][ T5362] syzkaller #0 Not tainted [ 85.806486][ T5362] ------------------------------------------------------ [ 85.810765][ T5362] syz.0.0/5362 is trying to acquire lock: [ 85.814002][ T5362] ffff88804198f840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.820497][ T5362] [ 85.820497][ T5362] but task is already holding lock: [ 85.830250][ T5362] ffff88804198fb38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.837639][ T5362] [ 85.837639][ T5362] which lock already depends on the new lock. [ 85.837639][ T5362] [ 85.844820][ T5362] [ 85.844820][ T5362] the existing dependency chain (in reverse order) is: [ 85.853744][ T5362] [ 85.853744][ T5362] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.857804][ T5362] lock_acquire+0x120/0x360 [ 85.860664][ T5362] __mutex_lock+0x187/0x1350 [ 85.871226][ T5362] l2cap_info_timeout+0x60/0xa0 [ 85.876376][ T5362] process_scheduled_works+0xae1/0x17b0 [ 85.879360][ T5362] worker_thread+0x8a0/0xda0 [ 85.881917][ T5362] kthread+0x70e/0x8a0 [ 85.890788][ T5362] ret_from_fork+0x3f9/0x770 [ 85.893683][ T5362] ret_from_fork_asm+0x1a/0x30 [ 85.896680][ T5362] [ 85.896680][ T5362] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.907257][ T5362] validate_chain+0xb9b/0x2140 [ 85.909336][ T5362] __lock_acquire+0xab9/0xd20 [ 85.911934][ T5362] lock_acquire+0x120/0x360 [ 85.914996][ T5362] __flush_work+0x6b8/0xbc0 [ 85.918974][ T5362] __cancel_work_sync+0xbe/0x110 [ 85.922666][ T5362] l2cap_conn_del+0x4f0/0x680 [ 85.926423][ T5362] hci_conn_hash_flush+0x10a/0x230 [ 85.930419][ T5362] hci_dev_close_sync+0xaef/0x1330 [ 85.934256][ T5362] hci_dev_close+0x108/0x200 [ 85.938529][ T5362] sock_do_ioctl+0xdc/0x300 [ 85.941197][ T5362] sock_ioctl+0x576/0x790 [ 85.953131][ T5362] __se_sys_ioctl+0xf9/0x170 [ 85.955908][ T5362] do_syscall_64+0xfa/0x3b0 [ 85.958830][ T5362] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.962531][ T5362] [ 85.962531][ T5362] other info that might help us debug this: [ 85.962531][ T5362] [ 85.968455][ T5362] Possible unsafe locking scenario: [ 85.968455][ T5362] [ 85.974632][ T5362] CPU0 CPU1 [ 85.978061][ T5362] ---- ---- [ 85.985487][ T5362] lock(&conn->lock#2); [ 85.989645][ T5362] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.995550][ T5362] lock(&conn->lock#2); [ 86.000304][ T5362] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.005912][ T5362] [ 86.005912][ T5362] *** DEADLOCK *** [ 86.005912][ T5362] [ 86.011098][ T5362] 5 locks held by syz.0.0/5362: [ 86.013415][ T5362] #0: ffff888043c6cdc0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.018771][ T5362] #1: ffff888043c6c0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.027565][ T5362] #2: ffffffff8f69f748 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.036637][ T5362] #3: ffff88804198fb38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.044332][ T5362] #4: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.050589][ T5362] [ 86.050589][ T5362] stack backtrace: [ 86.054319][ T5362] CPU: 0 UID: 0 PID: 5362 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.054343][ T5362] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.054352][ T5362] Call Trace: [ 86.054399][ T5362] [ 86.054445][ T5362] dump_stack_lvl+0x189/0x250 [ 86.054469][ T5362] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.054483][ T5362] ? __pfx__printk+0x10/0x10 [ 86.054585][ T5362] ? print_lock_name+0xde/0x100 [ 86.054605][ T5362] print_circular_bug+0x2ee/0x310 [ 86.054621][ T5362] check_noncircular+0x134/0x160 [ 86.054712][ T5362] validate_chain+0xb9b/0x2140 [ 86.054726][ T5362] ? do_raw_spin_lock+0x121/0x290 [ 86.054742][ T5362] ? look_up_lock_class+0x74/0x170 [ 86.054791][ T5362] ? register_lock_class+0x51/0x320 [ 86.054813][ T5362] __lock_acquire+0xab9/0xd20 [ 86.054873][ T5362] ? __flush_work+0xd2/0xbc0 [ 86.054887][ T5362] lock_acquire+0x120/0x360 [ 86.054905][ T5362] ? __flush_work+0xd2/0xbc0 [ 86.054957][ T5362] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.055014][ T5362] ? __flush_work+0xd2/0xbc0 [ 86.055028][ T5362] __flush_work+0x6b8/0xbc0 [ 86.055040][ T5362] ? __flush_work+0xd2/0xbc0 [ 86.055091][ T5362] ? __flush_work+0xd2/0xbc0 [ 86.055141][ T5362] ? __pfx___flush_work+0x10/0x10 [ 86.055155][ T5362] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.055170][ T5362] ? __pfx___cancel_work+0x10/0x10 [ 86.055223][ T5362] ? hci_conn_drop+0x14d/0x280 [ 86.055275][ T5362] __cancel_work_sync+0xbe/0x110 [ 86.055292][ T5362] l2cap_conn_del+0x4f0/0x680 [ 86.055313][ T5362] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.055374][ T5362] hci_conn_hash_flush+0x10a/0x230 [ 86.055386][ T5362] hci_dev_close_sync+0xaef/0x1330 [ 86.055443][ T5362] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.055463][ T5362] ? do_raw_read_unlock+0x3d/0x80 [ 86.055480][ T5362] hci_dev_close+0x108/0x200 [ 86.055548][ T5362] sock_do_ioctl+0xdc/0x300 [ 86.055564][ T5362] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.055577][ T5362] ? __lock_acquire+0xab9/0xd20 [ 86.055598][ T5362] sock_ioctl+0x576/0x790 [ 86.055612][ T5362] ? __pfx_sock_ioctl+0x10/0x10 [ 86.055622][ T5362] ? __fget_files+0x2a/0x420 [ 86.055636][ T5362] ? __fget_files+0x3a0/0x420 [ 86.055650][ T5362] ? __fget_files+0x2a/0x420 [ 86.055663][ T5362] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.055673][ T5362] ? __pfx_sock_ioctl+0x10/0x10 [ 86.055681][ T5362] __se_sys_ioctl+0xf9/0x170 [ 86.055694][ T5362] do_syscall_64+0xfa/0x3b0 [ 86.055712][ T5362] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.055726][ T5362] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.055738][ T5362] ? clear_bhb_loop+0x60/0xb0 [ 86.055752][ T5362] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.055766][ T5362] RIP: 0033:0x7f401a98ebe9 [ 86.055779][ T5362] 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.055792][ T5362] RSP: 002b:00007f401b718038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.055809][ T5362] RAX: ffffffffffffffda RBX: 00007f401abb6090 RCX: 00007f401a98ebe9 [ 86.055820][ T5362] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 86.055829][ T5362] RBP: 00007f401aa11e19 R08: 0000000000000000 R09: 0000000000000000 [ 86.055837][ T5362] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.055846][ T5362] R13: 00007f401abb6128 R14: 00007f401abb6090 R15: 00007ffd4b627e88 [ 86.055858][ T5362] [ 86.725999][ T54] cfg80211: failed to load regulatory.db [ 87.284413][ T4702] Bluetooth: hci0: command tx timeout [ 89.364654][ T4702] Bluetooth: hci0: command tx timeout [ 91.444438][ T4702] Bluetooth: hci0: command tx timeout