program: r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) 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, &(0x7f0000000340)={r1, r1, 0x8, 0x0, 0x0, 0xb, 0x1, 0x9, 0xfff9, 0x3, 0x0, 0x8, 'syz0\x00'}) ioctl$sock_bt_hci(r0, 0x400448ca, 0x0) [ 86.183629][ T4686] Bluetooth: hci0: command tx timeout [ 86.293161][ T5343] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.378034][ T5344] [ 86.379242][ T5344] ====================================================== [ 86.382154][ T5344] WARNING: possible circular locking dependency detected [ 86.385084][ T5344] 6.16.0-syzkaller #0 Not tainted [ 86.387325][ T5344] ------------------------------------------------------ [ 86.390745][ T5344] syz.0.0/5344 is trying to acquire lock: [ 86.393428][ T5344] ffff8880115a7840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.399020][ T5344] [ 86.399020][ T5344] but task is already holding lock: [ 86.402409][ T5344] ffff8880115a7b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.406433][ T5344] [ 86.406433][ T5344] which lock already depends on the new lock. [ 86.406433][ T5344] [ 86.410968][ T5344] [ 86.410968][ T5344] the existing dependency chain (in reverse order) is: [ 86.415024][ T5344] [ 86.415024][ T5344] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.418815][ T5344] lock_acquire+0x120/0x360 [ 86.421072][ T5344] __mutex_lock+0x182/0xe80 [ 86.423424][ T5344] l2cap_info_timeout+0x60/0xa0 [ 86.425965][ T5344] process_scheduled_works+0xae1/0x17b0 [ 86.429054][ T5344] worker_thread+0x8a0/0xda0 [ 86.431736][ T5344] kthread+0x711/0x8a0 [ 86.434026][ T5344] ret_from_fork+0x3fc/0x770 [ 86.436629][ T5344] ret_from_fork_asm+0x1a/0x30 [ 86.438846][ T5344] [ 86.438846][ T5344] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.443229][ T5344] validate_chain+0xb9b/0x2140 [ 86.445747][ T5344] __lock_acquire+0xab9/0xd20 [ 86.448807][ T5344] lock_acquire+0x120/0x360 [ 86.451229][ T5344] __flush_work+0x6b8/0xbc0 [ 86.453551][ T5344] __cancel_work_sync+0xbe/0x110 [ 86.455990][ T5344] l2cap_conn_del+0x4f0/0x680 [ 86.460812][ T5344] hci_conn_hash_flush+0x10d/0x230 [ 86.463662][ T5344] hci_dev_close_sync+0xaef/0x1330 [ 86.466094][ T5344] hci_dev_close+0x108/0x200 [ 86.468451][ T5344] sock_do_ioctl+0xdc/0x300 [ 86.470815][ T5344] sock_ioctl+0x576/0x790 [ 86.473102][ T5344] __se_sys_ioctl+0xfc/0x170 [ 86.476504][ T5344] do_syscall_64+0xfa/0x3b0 [ 86.480779][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.483758][ T5344] [ 86.483758][ T5344] other info that might help us debug this: [ 86.483758][ T5344] [ 86.488507][ T5344] Possible unsafe locking scenario: [ 86.488507][ T5344] [ 86.491913][ T5344] CPU0 CPU1 [ 86.494352][ T5344] ---- ---- [ 86.496831][ T5344] lock(&conn->lock#2); [ 86.499238][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.503773][ T5344] lock(&conn->lock#2); [ 86.506856][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.509905][ T5344] [ 86.509905][ T5344] *** DEADLOCK *** [ 86.509905][ T5344] [ 86.514181][ T5344] 5 locks held by syz.0.0/5344: [ 86.517599][ T5344] #0: ffff888033cf0dc0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.522569][ T5344] #1: ffff888033cf00b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.526920][ T5344] #2: ffffffff8f686188 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.531392][ T5344] #3: ffff8880115a7b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.535955][ T5344] #4: ffffffff8e13f0e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.540664][ T5344] [ 86.540664][ T5344] stack backtrace: [ 86.543232][ T5344] CPU: 0 UID: 0 PID: 5344 Comm: syz.0.0 Not tainted 6.16.0-syzkaller #0 PREEMPT(full) [ 86.543249][ T5344] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.543256][ T5344] Call Trace: [ 86.543264][ T5344] [ 86.543271][ T5344] dump_stack_lvl+0x189/0x250 [ 86.543293][ T5344] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.543306][ T5344] ? __pfx__printk+0x10/0x10 [ 86.543322][ T5344] ? print_lock_name+0xde/0x100 [ 86.543335][ T5344] print_circular_bug+0x2ee/0x310 [ 86.543350][ T5344] check_noncircular+0x134/0x160 [ 86.543364][ T5344] validate_chain+0xb9b/0x2140 [ 86.543376][ T5344] ? do_raw_spin_lock+0x121/0x290 [ 86.543389][ T5344] ? look_up_lock_class+0x74/0x170 [ 86.543399][ T5344] ? register_lock_class+0x51/0x320 [ 86.543410][ T5344] __lock_acquire+0xab9/0xd20 [ 86.543422][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.543434][ T5344] lock_acquire+0x120/0x360 [ 86.543444][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.543458][ T5344] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.543473][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.543484][ T5344] __flush_work+0x6b8/0xbc0 [ 86.543497][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.543510][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.543522][ T5344] ? __pfx___flush_work+0x10/0x10 [ 86.543535][ T5344] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.543548][ T5344] ? __pfx___cancel_work+0x10/0x10 [ 86.543561][ T5344] ? hci_conn_drop+0x14d/0x280 [ 86.543578][ T5344] __cancel_work_sync+0xbe/0x110 [ 86.543592][ T5344] l2cap_conn_del+0x4f0/0x680 [ 86.543605][ T5344] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.543619][ T5344] hci_conn_hash_flush+0x10d/0x230 [ 86.543635][ T5344] hci_dev_close_sync+0xaef/0x1330 [ 86.543648][ T5344] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.543660][ T5344] ? do_raw_read_unlock+0x3d/0x80 [ 86.543674][ T5344] hci_dev_close+0x108/0x200 [ 86.543688][ T5344] sock_do_ioctl+0xdc/0x300 [ 86.543699][ T5344] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.543707][ T5344] ? __lock_acquire+0xab9/0xd20 [ 86.543729][ T5344] sock_ioctl+0x576/0x790 [ 86.543736][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 86.543751][ T5344] ? __fget_files+0x2a/0x420 [ 86.543765][ T5344] ? __fget_files+0x3a0/0x420 [ 86.543779][ T5344] ? __fget_files+0x2a/0x420 [ 86.543794][ T5344] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.543806][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 86.543820][ T5344] __se_sys_ioctl+0xfc/0x170 [ 86.543831][ T5344] do_syscall_64+0xfa/0x3b0 [ 86.543842][ T5344] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.543854][ T5344] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.543866][ T5344] ? clear_bhb_loop+0x60/0xb0 [ 86.543880][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.543892][ T5344] RIP: 0033:0x7f0c7a38e9a9 [ 86.543904][ T5344] 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.543914][ T5344] RSP: 002b:00007f0c7b20c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.543926][ T5344] RAX: ffffffffffffffda RBX: 00007f0c7a5b6080 RCX: 00007f0c7a38e9a9 [ 86.543935][ T5344] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 [ 86.543943][ T5344] RBP: 00007f0c7a410d69 R08: 0000000000000000 R09: 0000000000000000 [ 86.543954][ T5344] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.543961][ T5344] R13: 0000000000000001 R14: 00007f0c7a5b6080 R15: 00007ffdf8e51938 [ 86.543971][ T5344] [ 88.205446][ T5318] Bluetooth: hci0: command tx timeout [ 90.285790][ T5318] Bluetooth: hci0: command tx timeout [ 91.729663][ T9] cfg80211: failed to load regulatory.db [ 92.365471][ T5318] Bluetooth: hci0: command tx timeout