program: r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r0, 0x4b32, 0x6) 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, &(0x7f00000000c0)={r1, r1, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r3 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r3, 0x400448ca, 0x0) [ 86.373236][ T4671] Bluetooth: hci0: command tx timeout [ 86.480744][ T5325] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.677692][ T5326] [ 86.678632][ T5326] ====================================================== [ 86.681576][ T5326] WARNING: possible circular locking dependency detected [ 86.684558][ T5326] syzkaller #0 Not tainted [ 86.686545][ T5326] ------------------------------------------------------ [ 86.689520][ T5326] syz.0.0/5326 is trying to acquire lock: [ 86.691901][ T5326] ffff888050c39840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.696722][ T5326] [ 86.696722][ T5326] but task is already holding lock: [ 86.699760][ T5326] ffff888050c39b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.703591][ T5326] [ 86.703591][ T5326] which lock already depends on the new lock. [ 86.703591][ T5326] [ 86.707830][ T5326] [ 86.707830][ T5326] the existing dependency chain (in reverse order) is: [ 86.711969][ T5326] [ 86.711969][ T5326] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.715262][ T5326] lock_acquire+0x120/0x360 [ 86.717269][ T5326] __mutex_lock+0x187/0x1350 [ 86.719613][ T5326] l2cap_info_timeout+0x60/0xa0 [ 86.722027][ T5326] process_scheduled_works+0xae1/0x17b0 [ 86.724720][ T5326] worker_thread+0x8a0/0xda0 [ 86.726745][ T5326] kthread+0x711/0x8a0 [ 86.728605][ T5326] ret_from_fork+0x4bc/0x870 [ 86.730661][ T5326] ret_from_fork_asm+0x1a/0x30 [ 86.732918][ T5326] [ 86.732918][ T5326] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.737211][ T5326] validate_chain+0xb9b/0x2140 [ 86.739420][ T5326] __lock_acquire+0xab9/0xd20 [ 86.741574][ T5326] lock_acquire+0x120/0x360 [ 86.743736][ T5326] __flush_work+0x6b8/0xbc0 [ 86.745827][ T5326] __cancel_work_sync+0xbe/0x110 [ 86.748233][ T5326] l2cap_conn_del+0x4f0/0x680 [ 86.750516][ T5326] hci_conn_hash_flush+0x10d/0x230 [ 86.752866][ T5326] hci_dev_close_sync+0xaef/0x1330 [ 86.755161][ T5326] hci_dev_close+0x108/0x200 [ 86.757270][ T5326] sock_do_ioctl+0xdc/0x300 [ 86.759147][ T5326] sock_ioctl+0x576/0x790 [ 86.761089][ T5326] __se_sys_ioctl+0xfc/0x170 [ 86.763161][ T5326] do_syscall_64+0xfa/0xfa0 [ 86.765276][ T5326] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.767970][ T5326] [ 86.767970][ T5326] other info that might help us debug this: [ 86.767970][ T5326] [ 86.772200][ T5326] Possible unsafe locking scenario: [ 86.772200][ T5326] [ 86.775212][ T5326] CPU0 CPU1 [ 86.777450][ T5326] ---- ---- [ 86.779596][ T5326] lock(&conn->lock#2); [ 86.781351][ T5326] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.785317][ T5326] lock(&conn->lock#2); [ 86.788201][ T5326] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.791108][ T5326] [ 86.791108][ T5326] *** DEADLOCK *** [ 86.791108][ T5326] [ 86.794394][ T5326] 5 locks held by syz.0.0/5326: [ 86.796503][ T5326] #0: ffff88803caf8dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.800552][ T5326] #1: ffff88803caf80b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.804548][ T5326] #2: ffffffff8f437928 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.808856][ T5326] #3: ffff888050c39b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.812957][ T5326] #4: ffffffff8df3d620 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.816830][ T5326] [ 86.816830][ T5326] stack backtrace: [ 86.819337][ T5326] CPU: 0 UID: 0 PID: 5326 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.819352][ T5326] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.819360][ T5326] Call Trace: [ 86.819369][ T5326] [ 86.819375][ T5326] dump_stack_lvl+0x189/0x250 [ 86.819396][ T5326] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.819413][ T5326] ? __pfx__printk+0x10/0x10 [ 86.819426][ T5326] ? print_lock_name+0xde/0x100 [ 86.819437][ T5326] print_circular_bug+0x2ee/0x310 [ 86.819452][ T5326] check_noncircular+0x134/0x160 [ 86.819467][ T5326] validate_chain+0xb9b/0x2140 [ 86.819479][ T5326] ? do_raw_spin_lock+0x121/0x290 [ 86.819495][ T5326] ? look_up_lock_class+0x74/0x170 [ 86.819509][ T5326] ? register_lock_class+0x51/0x320 [ 86.819521][ T5326] __lock_acquire+0xab9/0xd20 [ 86.819534][ T5326] ? __flush_work+0xd2/0xbc0 [ 86.819546][ T5326] lock_acquire+0x120/0x360 [ 86.819555][ T5326] ? __flush_work+0xd2/0xbc0 [ 86.819568][ T5326] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.819580][ T5326] ? __flush_work+0xd2/0xbc0 [ 86.819593][ T5326] __flush_work+0x6b8/0xbc0 [ 86.819605][ T5326] ? __flush_work+0xd2/0xbc0 [ 86.819618][ T5326] ? __flush_work+0xd2/0xbc0 [ 86.819629][ T5326] ? __pfx___flush_work+0x10/0x10 [ 86.819637][ T5326] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.819653][ T5326] ? __pfx___cancel_work+0x10/0x10 [ 86.819662][ T5326] ? hci_conn_drop+0x14d/0x280 [ 86.819671][ T5326] __cancel_work_sync+0xbe/0x110 [ 86.819681][ T5326] l2cap_conn_del+0x4f0/0x680 [ 86.819692][ T5326] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.819702][ T5326] hci_conn_hash_flush+0x10d/0x230 [ 86.819718][ T5326] hci_dev_close_sync+0xaef/0x1330 [ 86.819735][ T5326] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.819749][ T5326] ? do_raw_read_unlock+0x3d/0x80 [ 86.819765][ T5326] hci_dev_close+0x108/0x200 [ 86.819780][ T5326] sock_do_ioctl+0xdc/0x300 [ 86.819794][ T5326] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.819809][ T5326] sock_ioctl+0x576/0x790 [ 86.819821][ T5326] ? __pfx_sock_ioctl+0x10/0x10 [ 86.819834][ T5326] ? __fget_files+0x3a0/0x420 [ 86.819848][ T5326] ? __fget_files+0x2a/0x420 [ 86.819863][ T5326] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.819874][ T5326] ? __pfx_sock_ioctl+0x10/0x10 [ 86.819884][ T5326] __se_sys_ioctl+0xfc/0x170 [ 86.819897][ T5326] do_syscall_64+0xfa/0xfa0 [ 86.819912][ T5326] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.819929][ T5326] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.819945][ T5326] ? clear_bhb_loop+0x60/0xb0 [ 86.819957][ T5326] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.819968][ T5326] RIP: 0033:0x7efd7eb8f6c9 [ 86.819979][ T5326] 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.819993][ T5326] RSP: 002b:00007efd7fa36038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.820010][ T5326] RAX: ffffffffffffffda RBX: 00007efd7ede6090 RCX: 00007efd7eb8f6c9 [ 86.820021][ T5326] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000007 [ 86.820107][ T5326] RBP: 00007efd7ec11f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.820115][ T5326] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.820122][ T5326] R13: 00007efd7ede6128 R14: 00007efd7ede6090 R15: 00007ffc5d64e3d8 [ 86.820135][ T5326] [ 88.422219][ T4671] Bluetooth: hci0: command tx timeout [ 90.502250][ T4671] Bluetooth: hci0: command tx timeout [ 91.862494][ T10] cfg80211: failed to load regulatory.db [ 92.582212][ T4671] Bluetooth: hci0: command tx timeout