program: syz_emit_vhci(&(0x7f0000000340)=ANY=[@ANYBLOB="02c82028002400010007d3040007c4faff020c04000300d3"], 0x2d) r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r0, 0x400448ca, 0x0) [ 86.094049][ T4675] Bluetooth: hci0: command tx timeout [ 86.231955][ T5336] [ 86.233219][ T5336] ====================================================== [ 86.247045][ T5336] WARNING: possible circular locking dependency detected [ 86.250441][ T5336] 6.16.0-rc1-syzkaller-00182-g18531f4d1c8c #0 Not tainted [ 86.253810][ T5336] ------------------------------------------------------ [ 86.268559][ T5336] syz.0.0/5336 is trying to acquire lock: [ 86.276285][ T5336] ffff88804386a840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.286648][ T5336] [ 86.286648][ T5336] but task is already holding lock: [ 86.297758][ T5336] ffff88804386ab38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.305320][ T5336] [ 86.305320][ T5336] which lock already depends on the new lock. [ 86.305320][ T5336] [ 86.314313][ T5336] [ 86.314313][ T5336] the existing dependency chain (in reverse order) is: [ 86.328435][ T5336] [ 86.328435][ T5336] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.344903][ T5336] lock_acquire+0x120/0x360 [ 86.347188][ T5336] __mutex_lock+0x182/0xe80 [ 86.349398][ T5336] l2cap_info_timeout+0x60/0xa0 [ 86.351632][ T5336] process_scheduled_works+0xae1/0x17b0 [ 86.362533][ T5336] worker_thread+0x8a0/0xda0 [ 86.367262][ T5336] kthread+0x70e/0x8a0 [ 86.371763][ T5336] ret_from_fork+0x3fc/0x770 [ 86.379404][ T5336] ret_from_fork_asm+0x1a/0x30 [ 86.381875][ T5336] [ 86.381875][ T5336] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.398842][ T5336] validate_chain+0xb9b/0x2140 [ 86.403141][ T5336] __lock_acquire+0xab9/0xd20 [ 86.411235][ T5336] lock_acquire+0x120/0x360 [ 86.413405][ T5336] __flush_work+0x6b8/0xbc0 [ 86.423060][ T5336] __cancel_work_sync+0xbe/0x110 [ 86.437503][ T5336] l2cap_conn_del+0x4f0/0x680 [ 86.439912][ T5336] hci_conn_hash_flush+0x10a/0x230 [ 86.443298][ T5336] hci_dev_close_sync+0xaef/0x1330 [ 86.447196][ T5336] hci_dev_close+0x106/0x200 [ 86.450997][ T5336] sock_do_ioctl+0xdc/0x300 [ 86.454437][ T5336] sock_ioctl+0x576/0x790 [ 86.457677][ T5336] __se_sys_ioctl+0xf9/0x170 [ 86.460318][ T5336] do_syscall_64+0xfa/0x3b0 [ 86.462562][ T5336] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.481253][ T5336] [ 86.481253][ T5336] other info that might help us debug this: [ 86.481253][ T5336] [ 86.486072][ T5336] Possible unsafe locking scenario: [ 86.486072][ T5336] [ 86.489589][ T5336] CPU0 CPU1 [ 86.492468][ T5336] ---- ---- [ 86.508984][ T5336] lock(&conn->lock#2); [ 86.511065][ T5336] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.516039][ T5336] lock(&conn->lock#2); [ 86.518806][ T5336] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.524069][ T5336] [ 86.524069][ T5336] *** DEADLOCK *** [ 86.524069][ T5336] [ 86.530277][ T5336] 5 locks held by syz.0.0/5336: [ 86.546385][ T5336] #0: ffff88804405cd80 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0xfe/0x200 [ 86.550352][ T5336] #1: ffff88804405c078 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.557369][ T5336] #2: ffffffff8f677e28 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.568225][ T5336] #3: ffff88804386ab38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.585805][ T5336] #4: ffffffff8e13ed60 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.590117][ T5336] [ 86.590117][ T5336] stack backtrace: [ 86.592603][ T5336] CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted 6.16.0-rc1-syzkaller-00182-g18531f4d1c8c #0 PREEMPT(full) [ 86.592624][ T5336] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.592632][ T5336] Call Trace: [ 86.592643][ T5336] [ 86.592650][ T5336] dump_stack_lvl+0x189/0x250 [ 86.592677][ T5336] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.592695][ T5336] ? __pfx__printk+0x10/0x10 [ 86.592709][ T5336] ? print_lock_name+0xde/0x100 [ 86.592722][ T5336] print_circular_bug+0x2ee/0x310 [ 86.592736][ T5336] check_noncircular+0x134/0x160 [ 86.592748][ T5336] validate_chain+0xb9b/0x2140 [ 86.592760][ T5336] ? do_raw_spin_lock+0x121/0x290 [ 86.592778][ T5336] ? look_up_lock_class+0x74/0x170 [ 86.592796][ T5336] ? register_lock_class+0x51/0x320 [ 86.592814][ T5336] __lock_acquire+0xab9/0xd20 [ 86.592839][ T5336] ? __flush_work+0xd2/0xbc0 [ 86.592853][ T5336] lock_acquire+0x120/0x360 [ 86.592868][ T5336] ? __flush_work+0xd2/0xbc0 [ 86.592882][ T5336] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.592900][ T5336] ? __flush_work+0xd2/0xbc0 [ 86.592910][ T5336] __flush_work+0x6b8/0xbc0 [ 86.592922][ T5336] ? __flush_work+0xd2/0xbc0 [ 86.592935][ T5336] ? __flush_work+0xd2/0xbc0 [ 86.592945][ T5336] ? __pfx___flush_work+0x10/0x10 [ 86.592955][ T5336] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.592972][ T5336] ? __pfx___cancel_work+0x10/0x10 [ 86.592983][ T5336] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.592999][ T5336] ? l2cap_conn_del+0x3db/0x680 [ 86.593021][ T5336] __cancel_work_sync+0xbe/0x110 [ 86.593032][ T5336] l2cap_conn_del+0x4f0/0x680 [ 86.593047][ T5336] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.593058][ T5336] hci_conn_hash_flush+0x10a/0x230 [ 86.593072][ T5336] hci_dev_close_sync+0xaef/0x1330 [ 86.593085][ T5336] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.593101][ T5336] hci_dev_close+0x106/0x200 [ 86.593119][ T5336] sock_do_ioctl+0xdc/0x300 [ 86.593137][ T5336] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.593150][ T5336] ? __lock_acquire+0xab9/0xd20 [ 86.593168][ T5336] sock_ioctl+0x576/0x790 [ 86.593182][ T5336] ? __pfx_sock_ioctl+0x10/0x10 [ 86.593196][ T5336] ? __fget_files+0x2a/0x420 [ 86.593208][ T5336] ? __fget_files+0x3a0/0x420 [ 86.593217][ T5336] ? __fget_files+0x2a/0x420 [ 86.593231][ T5336] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.593255][ T5336] ? __pfx_sock_ioctl+0x10/0x10 [ 86.593269][ T5336] __se_sys_ioctl+0xf9/0x170 [ 86.593285][ T5336] do_syscall_64+0xfa/0x3b0 [ 86.593295][ T5336] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.593311][ T5336] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.593324][ T5336] ? clear_bhb_loop+0x60/0xb0 [ 86.593340][ T5336] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.593352][ T5336] RIP: 0033:0x7f423358e929 [ 86.593368][ T5336] 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.593379][ T5336] RSP: 002b:00007f422f9f5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.593396][ T5336] RAX: ffffffffffffffda RBX: 00007f42337b5fa0 RCX: 00007f423358e929 [ 86.593405][ T5336] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 [ 86.593411][ T5336] RBP: 00007f4233610b39 R08: 0000000000000000 R09: 0000000000000000 [ 86.593417][ T5336] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.593423][ T5336] R13: 0000000000000000 R14: 00007f42337b5fa0 R15: 00007ffd0033c898 [ 86.593433][ T5336]