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) r3 = syz_open_dev$tty20(0xc, 0x4, 0x1) ioctl$TCSETSW(r3, 0x5403, &(0x7f0000000040)={0x0, 0x0, 0x0, 0x0, 0x0, "90737f0000fffffffffffffbff95647fffffeb"}) r4 = dup(r3) read(r4, &(0x7f0000000c80)=""/4096, 0x1000) ioctl$SIOCX25CALLACCPTAPPRV(r4, 0x89e8) [ 86.589609][ T5337] Bluetooth: hci0: command tx timeout [ 86.720256][ T5359] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.787522][ T11] cfg80211: failed to load regulatory.db [ 86.869099][ T5360] [ 86.870597][ T5360] ====================================================== [ 86.873362][ T5360] WARNING: possible circular locking dependency detected [ 86.876093][ T5360] 6.17.0-rc1-syzkaller-00111-g24ea63ea3877 #0 Not tainted [ 86.878717][ T5360] ------------------------------------------------------ [ 86.881670][ T5360] syz.0.0/5360 is trying to acquire lock: [ 86.883520][ T5360] ffff8880118a9040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.887474][ T5360] [ 86.887474][ T5360] but task is already holding lock: [ 86.890499][ T5360] ffff8880118a9338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.895703][ T5360] [ 86.895703][ T5360] which lock already depends on the new lock. [ 86.895703][ T5360] [ 86.900260][ T5360] [ 86.900260][ T5360] the existing dependency chain (in reverse order) is: [ 86.904561][ T5360] [ 86.904561][ T5360] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.908056][ T5360] lock_acquire+0x120/0x360 [ 86.909852][ T5360] __mutex_lock+0x187/0x1360 [ 86.911628][ T5360] l2cap_info_timeout+0x60/0xa0 [ 86.913479][ T5360] process_scheduled_works+0xade/0x17b0 [ 86.915545][ T5360] worker_thread+0x8a0/0xda0 [ 86.917350][ T5360] kthread+0x70e/0x8a0 [ 86.919042][ T5360] ret_from_fork+0x3f9/0x770 [ 86.920812][ T5360] ret_from_fork_asm+0x1a/0x30 [ 86.922670][ T5360] [ 86.922670][ T5360] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.926455][ T5360] validate_chain+0xb9b/0x2140 [ 86.928348][ T5360] __lock_acquire+0xab9/0xd20 [ 86.930165][ T5360] lock_acquire+0x120/0x360 [ 86.931908][ T5360] __flush_work+0x6b8/0xbc0 [ 86.933713][ T5360] __cancel_work_sync+0xbe/0x110 [ 86.935585][ T5360] l2cap_conn_del+0x4f0/0x680 [ 86.937594][ T5360] hci_conn_hash_flush+0x10d/0x230 [ 86.939874][ T5360] hci_dev_close_sync+0xaef/0x1330 [ 86.942207][ T5360] hci_dev_close+0x108/0x200 [ 86.944580][ T5360] sock_do_ioctl+0xd9/0x300 [ 86.947080][ T5360] sock_ioctl+0x576/0x790 [ 86.949381][ T5360] __se_sys_ioctl+0xf9/0x170 [ 86.951618][ T5360] do_syscall_64+0xfa/0x3b0 [ 86.953732][ T5360] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.956469][ T5360] [ 86.956469][ T5360] other info that might help us debug this: [ 86.956469][ T5360] [ 86.960544][ T5360] Possible unsafe locking scenario: [ 86.960544][ T5360] [ 86.963812][ T5360] CPU0 CPU1 [ 86.966401][ T5360] ---- ---- [ 86.968760][ T5360] lock(&conn->lock#2); [ 86.972408][ T5360] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.976680][ T5360] lock(&conn->lock#2); [ 86.980097][ T5360] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.983682][ T5360] [ 86.983682][ T5360] *** DEADLOCK *** [ 86.983682][ T5360] [ 86.987679][ T5360] 5 locks held by syz.0.0/5360: [ 86.990489][ T5360] #0: ffff88803f338dc0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.994650][ T5360] #1: ffff88803f3380b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.998874][ T5360] #2: ffffffff8f69e988 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 87.003594][ T5360] #3: ffff8880118a9338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 87.009681][ T5360] #4: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 87.014207][ T5360] [ 87.014207][ T5360] stack backtrace: [ 87.016620][ T5360] CPU: 0 UID: 0 PID: 5360 Comm: syz.0.0 Not tainted 6.17.0-rc1-syzkaller-00111-g24ea63ea3877 #0 PREEMPT(full) [ 87.016640][ T5360] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 87.016651][ T5360] Call Trace: [ 87.016658][ T5360] [ 87.016664][ T5360] dump_stack_lvl+0x189/0x250 [ 87.016715][ T5360] ? __pfx_dump_stack_lvl+0x10/0x10 [ 87.016730][ T5360] ? __pfx__printk+0x10/0x10 [ 87.016745][ T5360] ? print_lock_name+0xde/0x100 [ 87.016760][ T5360] print_circular_bug+0x2ee/0x310 [ 87.016773][ T5360] check_noncircular+0x134/0x160 [ 87.016787][ T5360] validate_chain+0xb9b/0x2140 [ 87.016800][ T5360] ? do_raw_spin_lock+0x121/0x290 [ 87.016816][ T5360] ? look_up_lock_class+0x74/0x170 [ 87.016829][ T5360] ? register_lock_class+0x51/0x320 [ 87.016845][ T5360] __lock_acquire+0xab9/0xd20 [ 87.016862][ T5360] ? __flush_work+0xd2/0xbc0 [ 87.016873][ T5360] lock_acquire+0x120/0x360 [ 87.016889][ T5360] ? __flush_work+0xd2/0xbc0 [ 87.016902][ T5360] ? _raw_spin_unlock_irq+0x23/0x50 [ 87.016916][ T5360] ? __flush_work+0xd2/0xbc0 [ 87.016938][ T5360] __flush_work+0x6b8/0xbc0 [ 87.016951][ T5360] ? __flush_work+0xd2/0xbc0 [ 87.016965][ T5360] ? __flush_work+0xd2/0xbc0 [ 87.016977][ T5360] ? __pfx___flush_work+0x10/0x10 [ 87.016989][ T5360] ? __pfx_wq_barrier_func+0x10/0x10 [ 87.017002][ T5360] ? __pfx___cancel_work+0x10/0x10 [ 87.017015][ T5360] ? hci_conn_drop+0x14d/0x280 [ 87.017025][ T5360] __cancel_work_sync+0xbe/0x110 [ 87.017038][ T5360] l2cap_conn_del+0x4f0/0x680 [ 87.017054][ T5360] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 87.017068][ T5360] hci_conn_hash_flush+0x10d/0x230 [ 87.017084][ T5360] hci_dev_close_sync+0xaef/0x1330 [ 87.017099][ T5360] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 87.017112][ T5360] ? do_raw_read_unlock+0x3d/0x80 [ 87.017125][ T5360] hci_dev_close+0x108/0x200 [ 87.017139][ T5360] sock_do_ioctl+0xd9/0x300 [ 87.017151][ T5360] ? __pfx_sock_do_ioctl+0x10/0x10 [ 87.017161][ T5360] ? __lock_acquire+0xab9/0xd20 [ 87.017181][ T5360] sock_ioctl+0x576/0x790 [ 87.017197][ T5360] ? __pfx_sock_ioctl+0x10/0x10 [ 87.017209][ T5360] ? __fget_files+0x2a/0x420 [ 87.017224][ T5360] ? __fget_files+0x3a0/0x420 [ 87.017238][ T5360] ? __fget_files+0x2a/0x420 [ 87.017253][ T5360] ? bpf_lsm_file_ioctl+0x9/0x20 [ 87.017264][ T5360] ? __pfx_sock_ioctl+0x10/0x10 [ 87.017274][ T5360] __se_sys_ioctl+0xf9/0x170 [ 87.017287][ T5360] do_syscall_64+0xfa/0x3b0 [ 87.017301][ T5360] ? lockdep_hardirqs_on+0x9c/0x150 [ 87.017315][ T5360] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.017326][ T5360] ? clear_bhb_loop+0x60/0xb0 [ 87.017337][ T5360] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.017348][ T5360] RIP: 0033:0x7f19a478ebe9 [ 87.017361][ T5360] 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 [ 87.017371][ T5360] RSP: 002b:00007f19a553e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 87.017385][ T5360] RAX: ffffffffffffffda RBX: 00007f19a49b6090 RCX: 00007f19a478ebe9 [ 87.017394][ T5360] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 87.017402][ T5360] RBP: 00007f19a4811e19 R08: 0000000000000000 R09: 0000000000000000 [ 87.017410][ T5360] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 87.017418][ T5360] R13: 00007f19a49b6128 R14: 00007f19a49b6090 R15: 00007ffec3ecc9a8 [ 87.017430][ T5360] [ 88.599845][ T4704] Bluetooth: hci0: command tx timeout [ 90.679815][ T4704] Bluetooth: hci0: command tx timeout [ 92.764328][ T4704] Bluetooth: hci0: command tx timeout