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}, 0x7fc}, 0xe) r1 = socket$nl_route(0x10, 0x3, 0x0) ioctl$sock_SIOCGIFINDEX(r1, 0x8933, &(0x7f00000001c0)={'wg0\x00', 0x0}) sendmsg$nl_route_sched(r1, &(0x7f0000000040)={0x0, 0x0, &(0x7f0000000080)={&(0x7f0000000300)=@newqdisc={0x38, 0x24, 0x4ee4e6a52ff56541, 0x70bd28, 0x0, {0x0, 0x0, 0x0, r2, {}, {0xffff, 0xffff}, {0xd, 0x2}}, [@qdisc_kind_options=@q_fq_codel={{0xd}, {0x4}}]}, 0x38}, 0x1, 0x0, 0x0, 0x51}, 0x8000) r3 = socket(0x10, 0x3, 0x0) r4 = socket$packet(0x11, 0x2, 0x300) ioctl$sock_SIOCGIFINDEX(r4, 0x8933, &(0x7f0000000080)={'ip6tnl0\x00', 0x0}) sendmsg$nl_route_sched(r3, &(0x7f00000007c0)={0x0, 0x0, &(0x7f00000000c0)={&(0x7f00000003c0)=@newqdisc={0x90, 0x24, 0x3fe3aa0262d8c583, 0x4, 0x0, {0x0, 0x0, 0x0, r5, {0x0, 0x4}, {0xffff, 0xffff}, {0x9, 0xc}}, [@qdisc_kind_options=@q_netem={{0xa}, {0x60, 0x2, {{0x8, 0x0, 0x0, 0x1, 0x3, 0x200}, [@TCA_NETEM_SLOT={0x2c, 0xc, {0xffb, 0x2, 0x0, 0x0, 0x10, 0x4}}, @TCA_NETEM_LOSS={0x18, 0x5, 0x0, 0x1, [@NETEM_LOSS_GE={0x14, 0x2, {0x9, 0x8, 0x44f, 0x6}}]}]}}}]}, 0x90}, 0x1, 0x0, 0x0, 0x20000000}, 0x0) r6 = socket$nl_route(0x10, 0x3, 0x0) sendmsg$nl_route_sched(r6, &(0x7f0000000280)={0x0, 0x0, &(0x7f00000002c0)={&(0x7f0000000000)=@getqdisc={0x24, 0x26, 0x705, 0x70bd27, 0x25dfdbfd, {0x0, 0x0, 0x0, 0x0, {0x1, 0xfff1}, {0x10, 0x8}, {0x4, 0x7}}}, 0x24}, 0x1, 0x0, 0x0, 0x4c88b}, 0x0) r7 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r7, 0x400448c8, &(0x7f0000000340)={r0, r0, 0xb, 0x0, 0x0, 0x8, 0xb6, 0x77, 0x7, 0x841, 0x3, 0x10, 'syz0\x00'}) r8 = syz_open_dev$mouse(&(0x7f0000000040), 0x2, 0x80000) read$msr(r8, 0x0, 0x0) r9 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r9, 0x400448ca, 0x0) ioctl$CDROMSEEK(r8, 0x5316, &(0x7f0000000000)={0x5, 0x10, 0x8f, 0x7, 0x0, 0x90}) [ 86.736537][ T5329] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.759182][ T9] cfg80211: failed to load regulatory.db [ 86.852318][ T5329] [ 86.853718][ T5329] ====================================================== [ 86.857509][ T5329] WARNING: possible circular locking dependency detected [ 86.861360][ T5329] syzkaller #0 Not tainted [ 86.863815][ T5329] ------------------------------------------------------ [ 86.867146][ T5329] syz.0.0/5329 is trying to acquire lock: [ 86.869911][ T5329] ffff88801157a040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.875032][ T5329] [ 86.875032][ T5329] but task is already holding lock: [ 86.878339][ T5329] ffff88801157a338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.882028][ T5329] [ 86.882028][ T5329] which lock already depends on the new lock. [ 86.882028][ T5329] [ 86.886583][ T5329] [ 86.886583][ T5329] the existing dependency chain (in reverse order) is: [ 86.890548][ T5329] [ 86.890548][ T5329] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.893929][ T5329] lock_acquire+0x120/0x360 [ 86.896200][ T5329] __mutex_lock+0x187/0x1350 [ 86.898443][ T5329] l2cap_info_timeout+0x60/0xa0 [ 86.900835][ T5329] process_scheduled_works+0xae1/0x17b0 [ 86.903623][ T5329] worker_thread+0x8a0/0xda0 [ 86.905802][ T5329] kthread+0x711/0x8a0 [ 86.907856][ T5329] ret_from_fork+0x4bc/0x870 [ 86.910177][ T5329] ret_from_fork_asm+0x1a/0x30 [ 86.912541][ T5329] [ 86.912541][ T5329] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.917001][ T5329] validate_chain+0xb9b/0x2140 [ 86.919265][ T5329] __lock_acquire+0xab9/0xd20 [ 86.922009][ T5329] lock_acquire+0x120/0x360 [ 86.924391][ T5329] __flush_work+0x6b8/0xbc0 [ 86.926668][ T5329] __cancel_work_sync+0xbe/0x110 [ 86.929204][ T5329] l2cap_conn_del+0x4f0/0x680 [ 86.931452][ T5329] hci_conn_hash_flush+0x10d/0x230 [ 86.933899][ T5329] hci_dev_close_sync+0xaef/0x1330 [ 86.936347][ T5329] hci_dev_close+0x108/0x200 [ 86.938625][ T5329] sock_do_ioctl+0xdc/0x300 [ 86.940856][ T5329] sock_ioctl+0x576/0x790 [ 86.943023][ T5329] __se_sys_ioctl+0xfc/0x170 [ 86.945301][ T5329] do_syscall_64+0xfa/0xfa0 [ 86.947521][ T5329] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.950335][ T5329] [ 86.950335][ T5329] other info that might help us debug this: [ 86.950335][ T5329] [ 86.954594][ T5329] Possible unsafe locking scenario: [ 86.954594][ T5329] [ 86.957825][ T5329] CPU0 CPU1 [ 86.960262][ T5329] ---- ---- [ 86.962711][ T5329] lock(&conn->lock#2); [ 86.964364][ T5329] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.968770][ T5329] lock(&conn->lock#2); [ 86.971793][ T5329] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.974808][ T5329] [ 86.974808][ T5329] *** DEADLOCK *** [ 86.974808][ T5329] [ 86.978494][ T5329] 5 locks held by syz.0.0/5329: [ 86.980567][ T5329] #0: ffff88800039cdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.984484][ T5329] #1: ffff88800039c0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.988669][ T5329] #2: ffffffff8f437268 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.992900][ T5329] #3: ffff88801157a338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.996830][ T5329] #4: ffffffff8df3d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 87.000892][ T5329] [ 87.000892][ T5329] stack backtrace: [ 87.003515][ T5329] CPU: 0 UID: 0 PID: 5329 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 87.003525][ T5329] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 87.003530][ T5329] Call Trace: [ 87.003537][ T5329] [ 87.003541][ T5329] dump_stack_lvl+0x189/0x250 [ 87.003555][ T5329] ? __pfx_dump_stack_lvl+0x10/0x10 [ 87.003567][ T5329] ? __pfx__printk+0x10/0x10 [ 87.003577][ T5329] ? print_lock_name+0xde/0x100 [ 87.003587][ T5329] print_circular_bug+0x2ee/0x310 [ 87.003602][ T5329] check_noncircular+0x134/0x160 [ 87.003614][ T5329] validate_chain+0xb9b/0x2140 [ 87.003629][ T5329] ? do_raw_spin_lock+0x121/0x290 [ 87.003643][ T5329] ? look_up_lock_class+0x74/0x170 [ 87.003657][ T5329] ? register_lock_class+0x51/0x320 [ 87.003670][ T5329] __lock_acquire+0xab9/0xd20 [ 87.003680][ T5329] ? __flush_work+0xd2/0xbc0 [ 87.003692][ T5329] lock_acquire+0x120/0x360 [ 87.003703][ T5329] ? __flush_work+0xd2/0xbc0 [ 87.003717][ T5329] ? _raw_spin_unlock_irq+0x23/0x50 [ 87.003727][ T5329] ? __flush_work+0xd2/0xbc0 [ 87.003738][ T5329] __flush_work+0x6b8/0xbc0 [ 87.003752][ T5329] ? __flush_work+0xd2/0xbc0 [ 87.003762][ T5329] ? __flush_work+0xd2/0xbc0 [ 87.003774][ T5329] ? __pfx___flush_work+0x10/0x10 [ 87.003787][ T5329] ? __pfx_wq_barrier_func+0x10/0x10 [ 87.003799][ T5329] ? __pfx___cancel_work+0x10/0x10 [ 87.003811][ T5329] ? hci_conn_drop+0x14d/0x280 [ 87.003822][ T5329] __cancel_work_sync+0xbe/0x110 [ 87.003838][ T5329] l2cap_conn_del+0x4f0/0x680 [ 87.003855][ T5329] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 87.003869][ T5329] hci_conn_hash_flush+0x10d/0x230 [ 87.003885][ T5329] hci_dev_close_sync+0xaef/0x1330 [ 87.003900][ T5329] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 87.003913][ T5329] ? do_raw_read_unlock+0x3d/0x80 [ 87.003927][ T5329] hci_dev_close+0x108/0x200 [ 87.003940][ T5329] sock_do_ioctl+0xdc/0x300 [ 87.003952][ T5329] ? __pfx_sock_do_ioctl+0x10/0x10 [ 87.003966][ T5329] sock_ioctl+0x576/0x790 [ 87.003976][ T5329] ? __pfx_sock_ioctl+0x10/0x10 [ 87.003988][ T5329] ? __fget_files+0x3a0/0x420 [ 87.004001][ T5329] ? __fget_files+0x2a/0x420 [ 87.004015][ T5329] ? bpf_lsm_file_ioctl+0x9/0x20 [ 87.004025][ T5329] ? __pfx_sock_ioctl+0x10/0x10 [ 87.004035][ T5329] __se_sys_ioctl+0xfc/0x170 [ 87.004046][ T5329] do_syscall_64+0xfa/0xfa0 [ 87.004054][ T5329] ? lockdep_hardirqs_on+0x9c/0x150 [ 87.004061][ T5329] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.004067][ T5329] ? clear_bhb_loop+0x60/0xb0 [ 87.004075][ T5329] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.004085][ T5329] RIP: 0033:0x7fcf5378efc9 [ 87.004097][ T5329] 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.004106][ T5329] RSP: 002b:00007fcf5455f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 87.004118][ T5329] RAX: ffffffffffffffda RBX: 00007fcf539e5fa0 RCX: 00007fcf5378efc9 [ 87.004125][ T5329] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 000000000000000b [ 87.004132][ T5329] RBP: 00007fcf53811f91 R08: 0000000000000000 R09: 0000000000000000 [ 87.004138][ T5329] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 87.004144][ T5329] R13: 00007fcf539e6038 R14: 00007fcf539e5fa0 R15: 00007ffdf067cb98 [ 87.004153][ T5329] [ 87.148195][ T4670] Bluetooth: hci0: command tx timeout [ 89.157938][ T4670] Bluetooth: hci0: command tx timeout [ 91.238088][ T4670] Bluetooth: hci0: command tx timeout