program: r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r1 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r1, 0x4b32, 0x6) r2 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r2, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r3 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$sock_bt_hidp_HIDPCONNADD(r3, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) ioctl$sock_bt_hci(r0, 0x400448ca, 0x0) r4 = socket$nl_generic(0x10, 0x3, 0x10) r5 = socket$nl_generic(0x10, 0x3, 0x10) r6 = syz_genetlink_get_family_id$devlink(&(0x7f0000000640), 0xffffffffffffffff) r7 = seccomp$SECCOMP_SET_MODE_FILTER_LISTENER(0x1, 0x0, &(0x7f0000000400)={0x1, &(0x7f0000000380)=[{0x6, 0x0, 0x0, 0x7fffffff}]}) r8 = socket$unix(0x1, 0x5, 0x0) r9 = dup2(r8, r7) close_range(r9, 0xffffffffffffffff, 0x0) r10 = syz_open_dev$dri(&(0x7f0000000080), 0x2, 0x0) ioctl$DRM_IOCTL_SET_CLIENT_CAP(r10, 0x4010640d, &(0x7f0000000000)={0x3, 0x2}) syz_open_dev$dri(&(0x7f0000000040), 0x3400, 0x0) syz_open_dev$tty1(0xc, 0x4, 0x4) r11 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$PIO_SCRNMAP(r11, 0x4b41, &(0x7f00000029c0)) r12 = io_uring_setup(0x868, &(0x7f00000000c0)) io_uring_register$IORING_REGISTER_IOWQ_MAX_WORKERS(r12, 0x14, &(0x7f0000000000)=[0xffffffff], 0x2) sendmsg$DEVLINK_CMD_RATE_SET(r5, &(0x7f0000000140)={0x0, 0x0, &(0x7f0000000580)={&(0x7f0000000200)={0x3c, r6, 0x1, 0x0, 0x0, {0x2c}, [@DEVLINK_ATTR_PORT_INDEX={0x8, 0x58}, @handle=@nsim={{0xe}, {0xf, 0x2, {'netdevsim', 0x0}}}]}, 0x3c}}, 0x0) sendmsg$DEVLINK_CMD_SB_TC_POOL_BIND_SET(r4, &(0x7f0000000240)={&(0x7f0000000000)={0x10, 0x0, 0x0, 0x10000}, 0xc, &(0x7f0000000040)={&(0x7f0000000180)={0xb0, r6, 0x200, 0x70bd25, 0x25dfdbfd, {}, [{{@pci={{0x8}, {0x11}}, {0x8, 0x3, 0x1}}, {0x8, 0xb, 0x9}, {0x6, 0x16, 0x3}, {0x5}, {0x6, 0x11, 0x8}, {0x8, 0xb, 0x7fe000}}, {{@nsim={{0xe}, {0xf, 0x2, {'netdevsim', 0x0}}}, {0x8, 0x3, 0x3}}, {0x8, 0xb, 0x400}, {0x6}, {0x5, 0x12, 0x1}, {0x6, 0x11, 0xfffb}, {0x8, 0xb, 0x7}}]}, 0xb0}, 0x1, 0x0, 0x0, 0x20001}, 0x4008004) [ 85.519407][ T5343] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.640811][ T5344] [ 85.641945][ T5344] ====================================================== [ 85.644967][ T5344] WARNING: possible circular locking dependency detected [ 85.647885][ T5344] syzkaller #0 Not tainted [ 85.649643][ T5344] ------------------------------------------------------ [ 85.652595][ T5344] syz.0.0/5344 is trying to acquire lock: [ 85.654909][ T5344] ffff88803f5dc040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.659925][ T5344] [ 85.659925][ T5344] but task is already holding lock: [ 85.663126][ T5344] ffff88803f5dc338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.667005][ T5344] [ 85.667005][ T5344] which lock already depends on the new lock. [ 85.667005][ T5344] [ 85.671332][ T5344] [ 85.671332][ T5344] the existing dependency chain (in reverse order) is: [ 85.675215][ T5344] [ 85.675215][ T5344] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.678294][ T5344] __mutex_lock+0x187/0x1350 [ 85.680406][ T5344] l2cap_info_timeout+0x60/0xa0 [ 85.682641][ T5344] process_scheduled_works+0xad1/0x1770 [ 85.685305][ T5344] worker_thread+0x8a0/0xda0 [ 85.687500][ T5344] kthread+0x711/0x8a0 [ 85.689503][ T5344] ret_from_fork+0x52d/0xa60 [ 85.691692][ T5344] ret_from_fork_asm+0x1a/0x30 [ 85.693943][ T5344] [ 85.693943][ T5344] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.698123][ T5344] __lock_acquire+0x15a6/0x2cf0 [ 85.700411][ T5344] lock_acquire+0x117/0x340 [ 85.702593][ T5344] __flush_work+0x6b8/0xbc0 [ 85.704812][ T5344] __cancel_work_sync+0xbe/0x110 [ 85.707163][ T5344] l2cap_conn_del+0x4f0/0x680 [ 85.709371][ T5344] hci_conn_hash_flush+0x10d/0x230 [ 85.711663][ T5344] hci_dev_close_sync+0xaef/0x1330 [ 85.714048][ T5344] hci_dev_close+0x108/0x200 [ 85.716270][ T5344] sock_do_ioctl+0xdc/0x300 [ 85.718476][ T5344] sock_ioctl+0x576/0x790 [ 85.720620][ T5344] __se_sys_ioctl+0xfc/0x170 [ 85.722855][ T5344] do_syscall_64+0xfa/0xf80 [ 85.724998][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.727817][ T5344] [ 85.727817][ T5344] other info that might help us debug this: [ 85.727817][ T5344] [ 85.732200][ T5344] Possible unsafe locking scenario: [ 85.732200][ T5344] [ 85.735432][ T5344] CPU0 CPU1 [ 85.737783][ T5344] ---- ---- [ 85.740143][ T5344] lock(&conn->lock#2); [ 85.742069][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.746523][ T5344] lock(&conn->lock#2); [ 85.749717][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.752924][ T5344] [ 85.752924][ T5344] *** DEADLOCK *** [ 85.752924][ T5344] [ 85.756593][ T5344] 5 locks held by syz.0.0/5344: [ 85.758806][ T5344] #0: ffff888035f7cdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 85.763087][ T5344] #1: ffff888035f7c0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 85.767229][ T5344] #2: ffffffff8f466008 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 85.771659][ T5344] #3: ffff88803f5dc338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.775723][ T5344] #4: ffffffff8df414c0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 85.779766][ T5344] [ 85.779766][ T5344] stack backtrace: [ 85.782450][ T5344] CPU: 0 UID: 0 PID: 5344 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.782466][ T5344] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 85.782474][ T5344] Call Trace: [ 85.782482][ T5344] [ 85.782489][ T5344] dump_stack_lvl+0x189/0x250 [ 85.782507][ T5344] ? __pfx_dump_stack_lvl+0x10/0x10 [ 85.782519][ T5344] ? __pfx__printk+0x10/0x10 [ 85.782536][ T5344] ? print_lock_name+0xde/0x100 [ 85.782553][ T5344] print_circular_bug+0x2e2/0x300 [ 85.782569][ T5344] check_noncircular+0x12e/0x150 [ 85.782583][ T5344] __lock_acquire+0x15a6/0x2cf0 [ 85.782603][ T5344] ? do_raw_spin_unlock+0x4d/0x240 [ 85.782618][ T5344] ? _raw_spin_unlock_irqrestore+0xad/0x110 [ 85.782635][ T5344] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 85.782652][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.782663][ T5344] lock_acquire+0x117/0x340 [ 85.782680][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.782709][ T5344] ? _raw_spin_unlock_irq+0x23/0x50 [ 85.782722][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.782733][ T5344] __flush_work+0x6b8/0xbc0 [ 85.782745][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.782757][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.782768][ T5344] ? __pfx___flush_work+0x10/0x10 [ 85.782779][ T5344] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.782799][ T5344] ? __pfx___cancel_work+0x10/0x10 [ 85.782811][ T5344] ? hci_conn_drop+0x14d/0x280 [ 85.782823][ T5344] ? __cancel_work_sync+0x5c/0x110 [ 85.782836][ T5344] __cancel_work_sync+0xbe/0x110 [ 85.782846][ T5344] l2cap_conn_del+0x4f0/0x680 [ 85.782859][ T5344] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.782872][ T5344] hci_conn_hash_flush+0x10d/0x230 [ 85.782883][ T5344] hci_dev_close_sync+0xaef/0x1330 [ 85.782900][ T5344] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.782916][ T5344] ? __cancel_work_sync+0x5c/0x110 [ 85.782929][ T5344] hci_dev_close+0x108/0x200 [ 85.782942][ T5344] sock_do_ioctl+0xdc/0x300 [ 85.782952][ T5344] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.782962][ T5344] ? count_memcg_event_mm+0x21/0x260 [ 85.782977][ T5344] sock_ioctl+0x576/0x790 [ 85.782995][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 85.783021][ T5344] ? __fget_files+0x3a0/0x420 [ 85.783032][ T5344] ? __fget_files+0x2a/0x420 [ 85.783044][ T5344] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.783082][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 85.783098][ T5344] __se_sys_ioctl+0xfc/0x170 [ 85.783112][ T5344] do_syscall_64+0xfa/0xf80 [ 85.783125][ T5344] ? lockdep_hardirqs_on+0x98/0x140 [ 85.783138][ T5344] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.783148][ T5344] ? clear_bhb_loop+0x60/0xb0 [ 85.783160][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.783172][ T5344] RIP: 0033:0x7f6b40d8f7c9 [ 85.783184][ 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 [ 85.783193][ T5344] RSP: 002b:00007f6b41cb8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.783206][ T5344] RAX: ffffffffffffffda RBX: 00007f6b40fe6090 RCX: 00007f6b40d8f7c9 [ 85.783215][ T5344] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 [ 85.783222][ T5344] RBP: 00007f6b40e13f91 R08: 0000000000000000 R09: 0000000000000000 [ 85.783229][ T5344] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.783237][ T5344] R13: 00007f6b40fe6128 R14: 00007f6b40fe6090 R15: 00007ffcdb87b988 [ 85.783250][ T5344] [ 85.923790][ T4680] Bluetooth: hci0: command tx timeout [ 86.666997][ T10] cfg80211: failed to load regulatory.db [ 87.943897][ T4680] Bluetooth: hci0: command tx timeout [ 90.023901][ T4680] Bluetooth: hci0: command tx timeout