program: socket$inet_tcp(0x2, 0x1, 0x0) (async) r0 = socket$inet_tcp(0x2, 0x1, 0x0) syz_open_dev$tty1(0xc, 0x4, 0x1) (async) 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) ioctl$sock_bt_hidp_HIDPCONNADD(r3, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) (async) ioctl$sock_bt_hidp_HIDPCONNADD(r3, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) (async) r4 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r4, 0x400448ca, 0x0) setsockopt$inet_tcp_int(r0, 0x6, 0x210000000013, &(0x7f00000000c0)=0x100000001, 0x4) connect$inet(r0, &(0x7f0000000180)={0x2, 0x4e21, @local}, 0x10) setsockopt$inet_tcp_TCP_CONGESTION(r0, 0x6, 0xd, &(0x7f0000000200)='nv', 0x2) r5 = socket$kcm(0x10, 0x2, 0x4) socket$nl_route(0x10, 0x3, 0x0) (async) r6 = socket$nl_route(0x10, 0x3, 0x0) setsockopt$netlink_NETLINK_TX_RING(r6, 0x10e, 0xc, &(0x7f0000000040)={0x80}, 0x213) (async) setsockopt$netlink_NETLINK_TX_RING(r6, 0x10e, 0xc, &(0x7f0000000040)={0x80}, 0x213) sendmsg$nl_route(r6, &(0x7f0000000100)={0x0, 0x0, &(0x7f0000000280)={&(0x7f0000000080)=@ipv6_getaddr={0x18, 0x16, 0x205, 0x70bd2b, 0x0, {0x9, 0x0, 0x4}}, 0x18}, 0x1, 0x0, 0x0, 0x4004001}, 0x80010) (async) sendmsg$nl_route(r6, &(0x7f0000000100)={0x0, 0x0, &(0x7f0000000280)={&(0x7f0000000080)=@ipv6_getaddr={0x18, 0x16, 0x205, 0x70bd2b, 0x0, {0x9, 0x0, 0x4}}, 0x18}, 0x1, 0x0, 0x0, 0x4004001}, 0x80010) sendmsg$kcm(r5, &(0x7f0000000000)={0x0, 0x0, &(0x7f0000000200)=[{&(0x7f0000000b00)="89000000120081ae08060cdc030000017f03e3f7000000006ee2ffca1b1f00ff0f00000000000050375ed08a56331dbf9ed78105001ad6e747033a0093b837dc6cc01e32efaec8c7a6ec00120c00010004080c00bdad01409bbc7a46e39a54cbbda812176679df069163ce955fed0009d78f0a947ee2b49e33538afaeb2713f450ebd010a20ff27fff", 0x89}], 0x1, 0x0, 0x0, 0x7}, 0x0) r7 = socket$inet_smc(0x2b, 0x1, 0x0) ioctl$sock_inet_SIOCADDRT(r7, 0x890b, &(0x7f00000002c0)={0x0, {0x2, 0x4e22, @multicast1}, {0x2, 0x4e24, @dev={0xac, 0x14, 0x14, 0x18}}, {0x2, 0xff80, @empty}, 0x200, 0x0, 0x0, 0x0, 0x200, &(0x7f0000000140)='veth1_to_bond\x00', 0xffffffffffff0000, 0x2, 0x7}) socket$inet6_tcp(0xa, 0x1, 0x0) (async) r8 = socket$inet6_tcp(0xa, 0x1, 0x0) bind$inet6(r8, &(0x7f00000000c0)={0xa, 0x4e22, 0x9, @ipv4={'\x00', '\xff\xff', @loopback}, 0x7}, 0x1c) setsockopt$inet6_tcp_int(r8, 0x6, 0xa, &(0x7f0000000240)=0x7f, 0x4) r9 = fcntl$dupfd(r8, 0x0, r8) setsockopt$sock_int(r9, 0x1, 0x8, &(0x7f0000000400)=0x10, 0x4) r10 = io_uring_setup(0x6982, &(0x7f0000000040)={0x0, 0x203e, 0x800, 0x1, 0x1bd, 0x0, r9}) io_uring_enter(r10, 0xe78, 0xa86, 0x40, &(0x7f0000000100)={[0xad5]}, 0x8) sendmsg$inet6(r9, &(0x7f00000008c0)={&(0x7f0000000000)={0xa, 0x4e22, 0x9, @empty, 0x2}, 0x1c, 0x0}, 0x20040810) (async) sendmsg$inet6(r9, &(0x7f00000008c0)={&(0x7f0000000000)={0xa, 0x4e22, 0x9, @empty, 0x2}, 0x1c, 0x0}, 0x20040810) [ 197.697384][ T5335] Bluetooth: hci0: command tx timeout [ 197.771174][ T5357] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 197.850650][ T5358] [ 197.851742][ T5358] ====================================================== [ 197.854712][ T5358] WARNING: possible circular locking dependency detected [ 197.857766][ T5358] syzkaller #0 Not tainted [ 197.859645][ T5358] ------------------------------------------------------ [ 197.862723][ T5358] syz.0.0/5358 is trying to acquire lock: [ 197.865100][ T5358] ffff88803facf040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 197.869948][ T5358] [ 197.869948][ T5358] but task is already holding lock: [ 197.873067][ T5358] ffff88803facf338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 197.877000][ T5358] [ 197.877000][ T5358] which lock already depends on the new lock. [ 197.877000][ T5358] [ 197.881076][ T5358] [ 197.881076][ T5358] the existing dependency chain (in reverse order) is: [ 197.884640][ T5358] [ 197.884640][ T5358] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 197.887619][ T5358] lock_acquire+0x120/0x360 [ 197.889773][ T5358] __mutex_lock+0x187/0x1350 [ 197.892061][ T5358] l2cap_info_timeout+0x60/0xa0 [ 197.894460][ T5358] process_scheduled_works+0xae1/0x17b0 [ 197.897185][ T5358] worker_thread+0x8a0/0xda0 [ 197.899456][ T5358] kthread+0x711/0x8a0 [ 197.901582][ T5358] ret_from_fork+0x4bc/0x870 [ 197.903862][ T5358] ret_from_fork_asm+0x1a/0x30 [ 197.906259][ T5358] [ 197.906259][ T5358] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 197.910746][ T5358] validate_chain+0xb9b/0x2140 [ 197.913089][ T5358] __lock_acquire+0xab9/0xd20 [ 197.915334][ T5358] lock_acquire+0x120/0x360 [ 197.917523][ T5358] __flush_work+0x6b8/0xbc0 [ 197.919805][ T5358] __cancel_work_sync+0xbe/0x110 [ 197.922252][ T5358] l2cap_conn_del+0x4f0/0x680 [ 197.924354][ T5358] hci_conn_hash_flush+0x10d/0x230 [ 197.926601][ T5358] hci_dev_close_sync+0xaef/0x1330 [ 197.928875][ T5358] hci_dev_close+0x108/0x200 [ 197.931187][ T5358] sock_do_ioctl+0xdc/0x300 [ 197.933377][ T5358] sock_ioctl+0x576/0x790 [ 197.935530][ T5358] __se_sys_ioctl+0xfc/0x170 [ 197.937789][ T5358] do_syscall_64+0xfa/0xfa0 [ 197.940076][ T5358] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 197.942964][ T5358] [ 197.942964][ T5358] other info that might help us debug this: [ 197.942964][ T5358] [ 197.947465][ T5358] Possible unsafe locking scenario: [ 197.947465][ T5358] [ 197.950752][ T5358] CPU0 CPU1 [ 197.953168][ T5358] ---- ---- [ 197.955515][ T5358] lock(&conn->lock#2); [ 197.957377][ T5358] lock((work_completion)(&(&conn->info_timer)->work)); [ 197.961569][ T5358] lock(&conn->lock#2); [ 197.964544][ T5358] lock((work_completion)(&(&conn->info_timer)->work)); [ 197.967559][ T5358] [ 197.967559][ T5358] *** DEADLOCK *** [ 197.967559][ T5358] [ 197.971111][ T5358] 5 locks held by syz.0.0/5358: [ 197.973237][ T5358] #0: ffff8880116c0dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 197.977326][ T5358] #1: ffff8880116c00b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 197.981545][ T5358] #2: ffffffff8f4375a8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 197.985716][ T5358] #3: ffff88803facf338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 197.989524][ T5358] #4: ffffffff8df3d4e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 197.993482][ T5358] [ 197.993482][ T5358] stack backtrace: [ 197.996098][ T5358] CPU: 0 UID: 0 PID: 5358 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 197.996111][ T5358] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 197.996118][ T5358] Call Trace: [ 197.996125][ T5358] [ 197.996131][ T5358] dump_stack_lvl+0x189/0x250 [ 197.996150][ T5358] ? __pfx_dump_stack_lvl+0x10/0x10 [ 197.996164][ T5358] ? __pfx__printk+0x10/0x10 [ 197.996175][ T5358] ? print_lock_name+0xde/0x100 [ 197.996186][ T5358] print_circular_bug+0x2ee/0x310 [ 197.996201][ T5358] check_noncircular+0x134/0x160 [ 197.996215][ T5358] validate_chain+0xb9b/0x2140 [ 197.996228][ T5358] ? do_raw_spin_lock+0x121/0x290 [ 197.996240][ T5358] ? look_up_lock_class+0x74/0x170 [ 197.996251][ T5358] ? register_lock_class+0x51/0x320 [ 197.996259][ T5358] __lock_acquire+0xab9/0xd20 [ 197.996272][ T5358] ? __flush_work+0xd2/0xbc0 [ 197.996283][ T5358] lock_acquire+0x120/0x360 [ 197.996292][ T5358] ? __flush_work+0xd2/0xbc0 [ 197.996305][ T5358] ? _raw_spin_unlock_irq+0x23/0x50 [ 197.996318][ T5358] ? __flush_work+0xd2/0xbc0 [ 197.996331][ T5358] __flush_work+0x6b8/0xbc0 [ 197.996342][ T5358] ? __flush_work+0xd2/0xbc0 [ 197.996352][ T5358] ? __flush_work+0xd2/0xbc0 [ 197.996364][ T5358] ? __pfx___flush_work+0x10/0x10 [ 197.996383][ T5358] ? __pfx_wq_barrier_func+0x10/0x10 [ 197.996398][ T5358] ? __pfx___cancel_work+0x10/0x10 [ 197.996411][ T5358] ? hci_conn_drop+0x14d/0x280 [ 197.996422][ T5358] __cancel_work_sync+0xbe/0x110 [ 197.996435][ T5358] l2cap_conn_del+0x4f0/0x680 [ 197.996450][ T5358] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 197.996465][ T5358] hci_conn_hash_flush+0x10d/0x230 [ 197.996482][ T5358] hci_dev_close_sync+0xaef/0x1330 [ 197.996497][ T5358] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 197.996511][ T5358] ? do_raw_read_unlock+0x3d/0x80 [ 197.996527][ T5358] hci_dev_close+0x108/0x200 [ 197.996541][ T5358] sock_do_ioctl+0xdc/0x300 [ 197.996554][ T5358] ? __pfx_sock_do_ioctl+0x10/0x10 [ 197.996568][ T5358] sock_ioctl+0x576/0x790 [ 197.996579][ T5358] ? __pfx_sock_ioctl+0x10/0x10 [ 197.996589][ T5358] ? __fget_files+0x3a0/0x420 [ 197.996604][ T5358] ? __fget_files+0x2a/0x420 [ 197.996643][ T5358] ? bpf_lsm_file_ioctl+0x9/0x20 [ 197.996654][ T5358] ? __pfx_sock_ioctl+0x10/0x10 [ 197.996664][ T5358] __se_sys_ioctl+0xfc/0x170 [ 197.996676][ T5358] do_syscall_64+0xfa/0xfa0 [ 197.996690][ T5358] ? lockdep_hardirqs_on+0x9c/0x150 [ 197.996701][ T5358] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 197.996712][ T5358] ? clear_bhb_loop+0x60/0xb0 [ 197.996723][ T5358] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 197.996735][ T5358] RIP: 0033:0x7f8cfa38efc9 [ 197.996745][ T5358] 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 [ 197.996754][ T5358] RSP: 002b:00007f8cfb2bc038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 197.996766][ T5358] RAX: ffffffffffffffda RBX: 00007f8cfa5e6180 RCX: 00007f8cfa38efc9 [ 197.996776][ T5358] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 000000000000000b [ 197.996782][ T5358] RBP: 00007f8cfa411f91 R08: 0000000000000000 R09: 0000000000000000 [ 197.996788][ T5358] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 197.996794][ T5358] R13: 00007f8cfa5e6218 R14: 00007f8cfa5e6180 R15: 00007ffd7bcf7488 [ 197.996805][ T5358] [ 199.517602][ T1314] ieee802154 phy0 wpan0: encryption failed: -22 [ 199.521302][ T1314] ieee802154 phy1 wpan1: encryption failed: -22 [ 199.756300][ T4667] Bluetooth: hci0: command tx timeout [ 201.837091][ T4667] Bluetooth: hci0: command tx timeout [ 203.916193][ T4667] Bluetooth: hci0: command tx timeout