program: r0 = bpf$BPF_PROG_RAW_TRACEPOINT_LOAD(0x5, &(0x7f0000000600)={0x11, 0x3, &(0x7f0000000200)=@framed={{0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40000}}, &(0x7f0000000240)='syzkaller\x00'}, 0x94) r1 = bpf$BPF_RAW_TRACEPOINT_OPEN(0x11, &(0x7f0000000000)={&(0x7f0000000140)='contention_end\x00', r0}, 0x10) r2 = openat$tun(0xffffffffffffff9c, &(0x7f0000000000), 0x80680, 0x0) ioctl$TUNSETIFF(r2, 0x400454ca, &(0x7f0000000040)={'syzkaller0\x00', 0x7101}) r3 = socket(0x400000000010, 0x3, 0x0) r4 = socket$unix(0x1, 0x5, 0x0) ioctl$sock_SIOCGIFINDEX(r4, 0x8933, &(0x7f0000000100)={'syzkaller0\x00', 0x0}) sendmsg$nl_route_sched(r3, &(0x7f00000012c0)={0x0, 0x0, &(0x7f0000000080)={&(0x7f00000005c0)=@newqdisc={0x38, 0x24, 0x10, 0x70bd2d, 0xffffffff, {0x0, 0x0, 0x0, r5, {0x0, 0xfff1}, {0xffff, 0xffff}, {0x1, 0xf}}, [@qdisc_kind_options=@q_multiq={{0xb}, {0x8, 0x2, {0x40}}}]}, 0x38}}, 0x0) sendmsg$nl_route_sched(r3, &(0x7f0000000140)={0x0, 0x0, &(0x7f0000000440)={&(0x7f0000000180)=@newtfilter={0x34, 0x2c, 0xd27, 0x70bd28, 0x8020, {0x0, 0x0, 0x0, r5, {0x5, 0x7}, {}, {0xa, 0x2}}, [@filter_kind_options=@f_flower={{0xb}, {0x4}}]}, 0x34}, 0x1, 0x0, 0x0, 0x200c0e9}, 0x20000004) r6 = socket(0x2a, 0x2, 0x0) getsockname$packet(r6, &(0x7f0000000200)={0x11, 0x0, 0x0, 0x1, 0x0, 0x6, @broadcast}, &(0x7f0000001480)=0x14) sendmsg$nl_route_sched(0xffffffffffffffff, &(0x7f00000002c0)={0x0, 0x0, &(0x7f0000000040)={&(0x7f0000000400)=@newqdisc={0x44, 0x24, 0xf0b, 0xfffffffd, 0x0, {0x0, 0x0, 0x0, r7, {0x0, 0xfff1}, {0xffff, 0xffff}, {0x0, 0xfffe}}, [@qdisc_kind_options=@q_hfsc={{0x9}, {0x14, 0x2, @TCA_HFSC_RSC={0x10, 0x1, {0x6, 0x6, 0xd5}}}}]}, 0x44}}, 0x44884) sendmsg$IPCTNL_MSG_CT_NEW(0xffffffffffffffff, &(0x7f0000000300)={0x0, 0x0, &(0x7f00000000c0)={0x0}}, 0x0) sendmsg$nl_route_sched(0xffffffffffffffff, &(0x7f0000000340)={0x0, 0x0, &(0x7f00000000c0)={&(0x7f0000000000)=@newtfilter={0x40, 0x2c, 0xd27, 0x70bd2d, 0x25dfdffd, {0x0, 0x0, 0x0, r7, {0x6}, {}, {0x8, 0xffe0}}, [@filter_kind_options=@f_matchall={{0xd}, {0xc, 0x2, [@TCA_MATCHALL_CLASSID={0x8, 0x1, {0xffe0, 0xfff2}}]}}]}, 0x40}}, 0x2000c800) r8 = socket$netlink(0x10, 0x3, 0x0) sendmmsg(r8, &(0x7f00000002c0), 0x40000000000009f, 0x0) r9 = socket$unix(0x1, 0x5, 0x0) ioctl$sock_SIOCGIFINDEX(r9, 0x8933, &(0x7f0000000100)={'syzkaller0\x00', 0x0}) r11 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r12 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r12, 0x4b32, 0x6) r13 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r13, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r14 = socket$nl_route(0x10, 0x3, 0x0) sendmsg$nl_route(r14, &(0x7f0000000040)={0x0, 0x0, &(0x7f0000000000)={&(0x7f0000000140)=@newlink={0x44, 0x10, 0x581, 0x0, 0x25dfdbfc, {0x0, 0x0, 0x0, 0x0, 0x4d014}, [@IFLA_LINKINFO={0x24, 0x12, 0x0, 0x1, @bond={{0x9}, {0x14, 0x2, 0x0, 0x1, [@IFLA_BOND_DOWNDELAY={0x8, 0x1f, 0x7fffffff}, @IFLA_BOND_ARP_INTERVAL={0x8, 0x7, 0x9}]}}}]}, 0x44}, 0x1, 0x0, 0x0, 0x22004002}, 0x0) r15 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r15, 0x400448c8, &(0x7f00000000c0)={r13, r13, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) ioctl$sock_bt_hci(r11, 0x400448ca, 0x0) sendmsg$nl_route_sched(r3, &(0x7f00000003c0)={0x0, 0x0, &(0x7f0000000440)={&(0x7f0000000280)=@newtfilter={0x48, 0x2c, 0xd27, 0x70bd2c, 0x8000, {0x0, 0x0, 0x0, r10, {0xc, 0x7}, {}, {0xa, 0x2}}, [@filter_kind_options=@f_flower={{0xb}, {0x18, 0x2, [@TCA_FLOWER_KEY_IPV6_SRC={0x14, 0xe, @empty}]}}]}, 0x48}, 0x1, 0x0, 0x0, 0x22044028}, 0x84) close_range(r1, 0xffffffffffffffff, 0x0) [ 77.804624][ T5302] Bluetooth: hci0: command tx timeout [ 77.808668][ T1314] ieee802154 phy0 wpan0: encryption failed: -22 [ 77.811607][ T1314] ieee802154 phy1 wpan1: encryption failed: -22 [ 77.902195][ T5323] Zero length message leads to an empty skb [ 77.925636][ T5323] bond1: Removing last ns target with arp_interval on [ 77.935802][ T5323] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 78.032709][ T5323] [ 78.034035][ T5323] ====================================================== [ 78.037146][ T5323] WARNING: possible circular locking dependency detected [ 78.040152][ T5323] syzkaller #0 Not tainted [ 78.042120][ T5323] ------------------------------------------------------ [ 78.045171][ T5323] syz.0.0/5323 is trying to acquire lock: [ 78.047581][ T5323] ffff88803eba7840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 78.057645][ T5323] [ 78.057645][ T5323] but task is already holding lock: [ 78.060921][ T5323] ffff88803eba7b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 78.064986][ T5323] [ 78.064986][ T5323] which lock already depends on the new lock. [ 78.064986][ T5323] [ 78.069417][ T5323] [ 78.069417][ T5323] the existing dependency chain (in reverse order) is: [ 78.073342][ T5323] [ 78.073342][ T5323] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 78.076602][ T5323] lock_acquire+0x120/0x360 [ 78.078807][ T5323] __mutex_lock+0x187/0x1350 [ 78.081043][ T5323] l2cap_info_timeout+0x60/0xa0 [ 78.083484][ T5323] process_scheduled_works+0xae1/0x17b0 [ 78.086163][ T5323] worker_thread+0x8a0/0xda0 [ 78.088362][ T5323] kthread+0x711/0x8a0 [ 78.090362][ T5323] ret_from_fork+0x4bc/0x870 [ 78.092546][ T5323] ret_from_fork_asm+0x1a/0x30 [ 78.094791][ T5323] [ 78.094791][ T5323] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 78.099007][ T5323] validate_chain+0xb9b/0x2140 [ 78.101239][ T5323] __lock_acquire+0xab9/0xd20 [ 78.103525][ T5323] lock_acquire+0x120/0x360 [ 78.105757][ T5323] __flush_work+0x6b8/0xbc0 [ 78.107927][ T5323] __cancel_work_sync+0xbe/0x110 [ 78.110224][ T5323] l2cap_conn_del+0x4f0/0x680 [ 78.112489][ T5323] hci_conn_hash_flush+0x10d/0x230 [ 78.114959][ T5323] hci_dev_close_sync+0xaef/0x1330 [ 78.117363][ T5323] hci_dev_close+0x108/0x200 [ 78.119624][ T5323] sock_do_ioctl+0xdc/0x300 [ 78.121795][ T5323] sock_ioctl+0x576/0x790 [ 78.124039][ T5323] __se_sys_ioctl+0xfc/0x170 [ 78.126222][ T5323] do_syscall_64+0xfa/0xfa0 [ 78.128385][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 78.131089][ T5323] [ 78.131089][ T5323] other info that might help us debug this: [ 78.131089][ T5323] [ 78.135460][ T5323] Possible unsafe locking scenario: [ 78.135460][ T5323] [ 78.138643][ T5323] CPU0 CPU1 [ 78.140916][ T5323] ---- ---- [ 78.143201][ T5323] lock(&conn->lock#2); [ 78.144992][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 78.149030][ T5323] lock(&conn->lock#2); [ 78.151956][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 78.154929][ T5323] [ 78.154929][ T5323] *** DEADLOCK *** [ 78.154929][ T5323] [ 78.158204][ T5323] 5 locks held by syz.0.0/5323: [ 78.160277][ T5323] #0: ffff88803b9e8dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 78.164327][ T5323] #1: ffff88803b9e80b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 78.168425][ T5323] #2: ffffffff8f4382a8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 78.173057][ T5323] #3: ffff88803eba7b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 78.177690][ T5323] #4: ffffffff8df3d6e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 78.181370][ T5323] [ 78.181370][ T5323] stack backtrace: [ 78.183790][ T5323] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 78.183802][ T5323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 78.183809][ T5323] Call Trace: [ 78.183816][ T5323] [ 78.183822][ T5323] dump_stack_lvl+0x189/0x250 [ 78.183841][ T5323] ? __pfx_dump_stack_lvl+0x10/0x10 [ 78.183853][ T5323] ? __pfx__printk+0x10/0x10 [ 78.183864][ T5323] ? print_lock_name+0xde/0x100 [ 78.183874][ T5323] print_circular_bug+0x2ee/0x310 [ 78.183889][ T5323] check_noncircular+0x134/0x160 [ 78.183904][ T5323] validate_chain+0xb9b/0x2140 [ 78.183917][ T5323] ? do_raw_spin_lock+0x121/0x290 [ 78.183932][ T5323] ? look_up_lock_class+0x74/0x170 [ 78.183946][ T5323] ? register_lock_class+0x51/0x320 [ 78.183958][ T5323] __lock_acquire+0xab9/0xd20 [ 78.183969][ T5323] ? __flush_work+0xd2/0xbc0 [ 78.183981][ T5323] lock_acquire+0x120/0x360 [ 78.183991][ T5323] ? __flush_work+0xd2/0xbc0 [ 78.184003][ T5323] ? _raw_spin_unlock_irq+0x23/0x50 [ 78.184017][ T5323] ? __flush_work+0xd2/0xbc0 [ 78.184029][ T5323] __flush_work+0x6b8/0xbc0 [ 78.184041][ T5323] ? __flush_work+0xd2/0xbc0 [ 78.184053][ T5323] ? __flush_work+0xd2/0xbc0 [ 78.184065][ T5323] ? __pfx___flush_work+0x10/0x10 [ 78.184078][ T5323] ? __pfx_wq_barrier_func+0x10/0x10 [ 78.184091][ T5323] ? __pfx___cancel_work+0x10/0x10 [ 78.184104][ T5323] ? hci_conn_drop+0x14d/0x280 [ 78.184117][ T5323] __cancel_work_sync+0xbe/0x110 [ 78.184130][ T5323] l2cap_conn_del+0x4f0/0x680 [ 78.184147][ T5323] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 78.184171][ T5323] hci_conn_hash_flush+0x10d/0x230 [ 78.184185][ T5323] hci_dev_close_sync+0xaef/0x1330 [ 78.184203][ T5323] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 78.184223][ T5323] ? do_raw_read_unlock+0x3d/0x80 [ 78.184239][ T5323] hci_dev_close+0x108/0x200 [ 78.184257][ T5323] sock_do_ioctl+0xdc/0x300 [ 78.184270][ T5323] ? __pfx_sock_do_ioctl+0x10/0x10 [ 78.184284][ T5323] sock_ioctl+0x576/0x790 [ 78.184297][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 78.184311][ T5323] ? __fget_files+0x3a0/0x420 [ 78.184326][ T5323] ? __fget_files+0x2a/0x420 [ 78.184340][ T5323] ? bpf_lsm_file_ioctl+0x9/0x20 [ 78.184350][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 78.184361][ T5323] __se_sys_ioctl+0xfc/0x170 [ 78.184374][ T5323] do_syscall_64+0xfa/0xfa0 [ 78.184388][ T5323] ? lockdep_hardirqs_on+0x9c/0x150 [ 78.184402][ T5323] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 78.184413][ T5323] ? clear_bhb_loop+0x60/0xb0 [ 78.184425][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 78.184435][ T5323] RIP: 0033:0x7f067318f749 [ 78.184446][ T5323] 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 [ 78.184454][ T5323] RSP: 002b:00007f0673ff9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 78.184466][ T5323] RAX: ffffffffffffffda RBX: 00007f06733e5fa0 RCX: 00007f067318f749 [ 78.184475][ T5323] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 000000000000000c [ 78.184482][ T5323] RBP: 00007f0673213f91 R08: 0000000000000000 R09: 0000000000000000 [ 78.184490][ T5323] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 78.184497][ T5323] R13: 00007f06733e6038 R14: 00007f06733e5fa0 R15: 00007ffe0170ad58 [ 78.184508][ T5323] [ 79.864304][ T4671] Bluetooth: hci0: command tx timeout [ 81.944648][ T4671] Bluetooth: hci0: command tx timeout [ 84.024361][ T4671] Bluetooth: hci0: command tx timeout