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, &(0x7f0000000340)={r0, r0, 0x8, 0x0, 0x0, 0xb, 0x1, 0xb57, 0xfff9, 0x3, 0x0, 0x8, 'syz0\x00'}) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r2, 0x400448ca, 0x0) [ 86.703910][ T45] Bluetooth: hci0: command tx timeout [ 86.861616][ T5325] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.970998][ T5325] [ 86.972208][ T5325] ====================================================== [ 86.975545][ T5325] WARNING: possible circular locking dependency detected [ 86.979407][ T5325] syzkaller #0 Not tainted [ 86.981493][ T5325] ------------------------------------------------------ [ 86.985001][ T5325] syz.0.0/5325 is trying to acquire lock: [ 86.987749][ T5325] ffff888034862840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 86.993527][ T5325] [ 86.993527][ T5325] but task is already holding lock: [ 86.997065][ T5325] ffff888034862af8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 87.000847][ T5325] [ 87.000847][ T5325] which lock already depends on the new lock. [ 87.000847][ T5325] [ 87.005777][ T5325] [ 87.005777][ T5325] the existing dependency chain (in reverse order) is: [ 87.010296][ T5325] [ 87.010296][ T5325] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 87.013953][ T5325] __mutex_lock+0x19f/0x1300 [ 87.016776][ T5325] l2cap_info_timeout+0x60/0xa0 [ 87.019436][ T5325] process_scheduled_works+0xb6e/0x18c0 [ 87.022642][ T5325] worker_thread+0xa53/0xfc0 [ 87.025314][ T5325] kthread+0x388/0x470 [ 87.028793][ T5325] ret_from_fork+0x51e/0xb90 [ 87.032195][ T5325] ret_from_fork_asm+0x1a/0x30 [ 87.035260][ T5325] [ 87.035260][ T5325] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 87.040560][ T5325] __lock_acquire+0x15a5/0x2cf0 [ 87.043420][ T5325] lock_acquire+0xf0/0x2e0 [ 87.047120][ T5325] __flush_work+0x700/0xc50 [ 87.049848][ T5325] __cancel_work_sync+0xbe/0x110 [ 87.052374][ T5325] l2cap_conn_del+0x40f/0x5c0 [ 87.054776][ T5325] hci_conn_hash_flush+0x10d/0x260 [ 87.057444][ T5325] hci_dev_close_sync+0x821/0x10e0 [ 87.060346][ T5325] hci_dev_close+0x108/0x260 [ 87.062970][ T5325] sock_do_ioctl+0x101/0x320 [ 87.065985][ T5325] sock_ioctl+0x5c6/0x7f0 [ 87.068859][ T5325] __se_sys_ioctl+0xfc/0x170 [ 87.071288][ T5325] do_syscall_64+0x14d/0xf80 [ 87.073791][ T5325] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.076798][ T5325] [ 87.076798][ T5325] other info that might help us debug this: [ 87.076798][ T5325] [ 87.080675][ T5325] Possible unsafe locking scenario: [ 87.080675][ T5325] [ 87.083540][ T5325] CPU0 CPU1 [ 87.085944][ T5325] ---- ---- [ 87.088441][ T5325] lock(&conn->lock#2); [ 87.090741][ T5325] lock((work_completion)(&(&conn->info_timer)->work)); [ 87.095547][ T5325] lock(&conn->lock#2); [ 87.098947][ T5325] lock((work_completion)(&(&conn->info_timer)->work)); [ 87.102123][ T5325] [ 87.102123][ T5325] *** DEADLOCK *** [ 87.102123][ T5325] [ 87.106034][ T5325] 5 locks held by syz.0.0/5325: [ 87.108596][ T5325] #0: ffff88801196cec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x260 [ 87.113155][ T5325] #1: ffff88801196c0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x10e0 [ 87.117484][ T5325] #2: ffffffff8fd5c768 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 87.123000][ T5325] #3: ffff888034862af8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 87.127645][ T5325] #4: ffffffff8e75e460 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 87.131837][ T5325] [ 87.131837][ T5325] stack backtrace: [ 87.134384][ T5325] CPU: 0 UID: 0 PID: 5325 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 87.134406][ T5325] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 87.134415][ T5325] Call Trace: [ 87.134423][ T5325] [ 87.134430][ T5325] dump_stack_lvl+0xe8/0x150 [ 87.134456][ T5325] print_circular_bug+0x2e1/0x300 [ 87.134479][ T5325] check_noncircular+0x12e/0x150 [ 87.134500][ T5325] __lock_acquire+0x15a5/0x2cf0 [ 87.134526][ T5325] ? do_raw_spin_lock+0x12b/0x2f0 [ 87.134542][ T5325] ? do_raw_spin_unlock+0x4d/0x210 [ 87.134554][ T5325] lock_acquire+0xf0/0x2e0 [ 87.134569][ T5325] ? __flush_work+0x100/0xc50 [ 87.134590][ T5325] ? __flush_work+0x100/0xc50 [ 87.134608][ T5325] __flush_work+0x700/0xc50 [ 87.134622][ T5325] ? __flush_work+0x100/0xc50 [ 87.134635][ T5325] ? __flush_work+0x100/0xc50 [ 87.134650][ T5325] ? __pfx___flush_work+0x10/0x10 [ 87.134667][ T5325] ? __pfx_wq_barrier_func+0x10/0x10 [ 87.134685][ T5325] ? __cancel_work_sync+0x5c/0x110 [ 87.134701][ T5325] __cancel_work_sync+0xbe/0x110 [ 87.134717][ T5325] l2cap_conn_del+0x40f/0x5c0 [ 87.134735][ T5325] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 87.134751][ T5325] hci_conn_hash_flush+0x10d/0x260 [ 87.134770][ T5325] hci_dev_close_sync+0x821/0x10e0 [ 87.134785][ T5325] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 87.134799][ T5325] ? lockdep_hardirqs_on+0x7a/0x110 [ 87.134810][ T5325] ? enable_work+0x1fd/0x230 [ 87.134828][ T5325] hci_dev_close+0x108/0x260 [ 87.134842][ T5325] sock_do_ioctl+0x101/0x320 [ 87.134856][ T5325] ? __pfx_sock_do_ioctl+0x10/0x10 [ 87.134866][ T5325] ? do_futex+0x333/0x420 [ 87.134884][ T5325] sock_ioctl+0x5c6/0x7f0 [ 87.134898][ T5325] ? __pfx_sock_ioctl+0x10/0x10 [ 87.134910][ T5325] ? __fget_files+0x2a/0x420 [ 87.134927][ T5325] ? __fget_files+0x3a0/0x420 [ 87.134943][ T5325] ? __fget_files+0x2a/0x420 [ 87.134959][ T5325] ? bpf_lsm_file_ioctl+0x9/0x20 [ 87.134972][ T5325] ? __pfx_sock_ioctl+0x10/0x10 [ 87.134984][ T5325] __se_sys_ioctl+0xfc/0x170 [ 87.134997][ T5325] do_syscall_64+0x14d/0xf80 [ 87.135010][ T5325] ? trace_irq_disable+0x3b/0x150 [ 87.135028][ T5325] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.135042][ T5325] ? clear_bhb_loop+0x40/0x90 [ 87.135055][ T5325] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.135068][ T5325] RIP: 0033:0x7fc67bd9c799 [ 87.135083][ T5325] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 [ 87.135094][ T5325] RSP: 002b:00007fc67cc2afe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 87.135109][ T5325] RAX: ffffffffffffffda RBX: 00007fc67c015fa0 RCX: 00007fc67bd9c799 [ 87.135120][ T5325] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 87.135129][ T5325] RBP: 00007fc67be32c99 R08: 0000000000000000 R09: 0000000000000000 [ 87.135138][ T5325] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 87.135145][ T5325] R13: 00007fc67c016038 R14: 00007fc67c015fa0 R15: 00007ffe0b2de8d8 [ 87.135157][ T5325] [ 88.710040][ T45] Bluetooth: hci0: command tx timeout [ 90.790302][ T45] Bluetooth: hci0: command tx timeout [ 91.835154][ T1365] cfg80211: failed to load regulatory.db [ 92.870130][ T45] Bluetooth: hci0: command tx timeout