program: r0 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &(0x7f0000000280)=@bpf_lsm={0x6, 0x3, &(0x7f00000003c0)=ANY=[@ANYBLOB="18000000003f000000000000000000f195"], &(0x7f0000000140)='GPL\x00', 0x0, 0x0, 0x0, 0x41000}, 0x94) syz_init_net_socket$bt_l2cap(0x1f, 0x3, 0x0) connect$bt_l2cap(0xffffffffffffffff, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x11}, 0x1, 0x2}, 0xe) syz_emit_vhci(&(0x7f0000000340)=ANY=[@ANYBLOB="02c82028002400010007d3040007c4faff020c04000300d3"], 0x2d) r1 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r2 = socket$nl_route(0x10, 0x3, 0x0) sendmsg$nl_route(r2, &(0x7f00000006c0)={0x0, 0x0, &(0x7f0000000280)={&(0x7f0000000040)=@newlink={0x44, 0x10, 0x40d, 0x70bd2a, 0x0, {0x0, 0x0, 0x0, 0x0, 0x1}, [@IFLA_LINKINFO={0x24, 0x12, 0x0, 0x1, @bond={{0x9}, {0x14, 0x2, 0x0, 0x1, [@IFLA_BOND_MODE={0x5, 0x1, 0x6}, @IFLA_BOND_TLB_DYNAMIC_LB={0x5}]}}}]}, 0x44}}, 0x0) ioctl$HCIINQUIRY(r1, 0x400448ca, 0x0) bpf$BPF_PROG_TEST_RUN(0x1c, &(0x7f0000000240)={r0, 0x26, 0x25, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x40) bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &(0x7f0000000280)=@bpf_lsm={0x6, 0x3, &(0x7f00000003c0)=ANY=[@ANYBLOB="18000000003f000000000000000000f195"], &(0x7f0000000140)='GPL\x00', 0x0, 0x0, 0x0, 0x41000}, 0x94) (async) syz_init_net_socket$bt_l2cap(0x1f, 0x3, 0x0) (async) connect$bt_l2cap(0xffffffffffffffff, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x11}, 0x1, 0x2}, 0xe) (async) syz_emit_vhci(&(0x7f0000000340)=ANY=[@ANYBLOB="02c82028002400010007d3040007c4faff020c04000300d3"], 0x2d) (async) syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) (async) socket$nl_route(0x10, 0x3, 0x0) (async) sendmsg$nl_route(r2, &(0x7f00000006c0)={0x0, 0x0, &(0x7f0000000280)={&(0x7f0000000040)=@newlink={0x44, 0x10, 0x40d, 0x70bd2a, 0x0, {0x0, 0x0, 0x0, 0x0, 0x1}, [@IFLA_LINKINFO={0x24, 0x12, 0x0, 0x1, @bond={{0x9}, {0x14, 0x2, 0x0, 0x1, [@IFLA_BOND_MODE={0x5, 0x1, 0x6}, @IFLA_BOND_TLB_DYNAMIC_LB={0x5}]}}}]}, 0x44}}, 0x0) (async) ioctl$HCIINQUIRY(r1, 0x400448ca, 0x0) (async) bpf$BPF_PROG_TEST_RUN(0x1c, &(0x7f0000000240)={r0, 0x26, 0x25, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x40) (async) [ 85.628344][ T45] Bluetooth: hci0: command tx timeout [ 85.717269][ T5360] 8021q: adding VLAN 0 to HW filter on device bond1 [ 85.733614][ T5360] [ 85.734747][ T5360] ====================================================== [ 85.737719][ T5360] WARNING: possible circular locking dependency detected [ 85.740833][ T5360] 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0 Not tainted [ 85.744076][ T5360] ------------------------------------------------------ [ 85.746730][ T5360] syz.0.0/5360 is trying to acquire lock: [ 85.749252][ T5360] ffff88803f178840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.754575][ T5360] [ 85.754575][ T5360] but task is already holding lock: [ 85.757921][ T5360] ffff88803f178b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.761818][ T5360] [ 85.761818][ T5360] which lock already depends on the new lock. [ 85.761818][ T5360] [ 85.766113][ T5360] [ 85.766113][ T5360] the existing dependency chain (in reverse order) is: [ 85.769716][ T5360] [ 85.769716][ T5360] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.773123][ T5360] lock_acquire+0x120/0x360 [ 85.775510][ T5360] __mutex_lock+0x187/0x1360 [ 85.777878][ T5360] l2cap_info_timeout+0x60/0xa0 [ 85.780274][ T5360] process_scheduled_works+0xade/0x17b0 [ 85.782953][ T5360] worker_thread+0x8a0/0xda0 [ 85.785226][ T5360] kthread+0x70e/0x8a0 [ 85.787328][ T5360] ret_from_fork+0x3f9/0x770 [ 85.789979][ T5360] ret_from_fork_asm+0x1a/0x30 [ 85.792806][ T5360] [ 85.792806][ T5360] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.797133][ T5360] validate_chain+0xb9b/0x2140 [ 85.799399][ T5360] __lock_acquire+0xab9/0xd20 [ 85.801594][ T5360] lock_acquire+0x120/0x360 [ 85.803860][ T5360] __flush_work+0x6b8/0xbc0 [ 85.806147][ T5360] __cancel_work_sync+0xbe/0x110 [ 85.808748][ T5360] l2cap_conn_del+0x4f0/0x680 [ 85.811209][ T5360] hci_conn_hash_flush+0x10a/0x230 [ 85.813748][ T5360] hci_dev_close_sync+0xaef/0x1330 [ 85.816216][ T5360] hci_dev_close+0x108/0x200 [ 85.818301][ T5360] sock_do_ioctl+0xdc/0x300 [ 85.820832][ T5360] sock_ioctl+0x576/0x790 [ 85.823196][ T5360] __se_sys_ioctl+0xf9/0x170 [ 85.825439][ T5360] do_syscall_64+0xfa/0x3b0 [ 85.827580][ T5360] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.830322][ T5360] [ 85.830322][ T5360] other info that might help us debug this: [ 85.830322][ T5360] [ 85.834666][ T5360] Possible unsafe locking scenario: [ 85.834666][ T5360] [ 85.837838][ T5360] CPU0 CPU1 [ 85.840246][ T5360] ---- ---- [ 85.842616][ T5360] lock(&conn->lock#2); [ 85.844486][ T5360] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.848753][ T5360] lock(&conn->lock#2); [ 85.851759][ T5360] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.854833][ T5360] [ 85.854833][ T5360] *** DEADLOCK *** [ 85.854833][ T5360] [ 85.858326][ T5360] 5 locks held by syz.0.0/5360: [ 85.860508][ T5360] #0: ffff88803e9c8dc0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 85.864860][ T5360] #1: ffff88803e9c80b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 85.869761][ T5360] #2: ffffffff8f69e9c8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 85.874855][ T5360] #3: ffff88803f178b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.878960][ T5360] #4: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 85.882912][ T5360] [ 85.882912][ T5360] stack backtrace: [ 85.885460][ T5360] CPU: 0 UID: 0 PID: 5360 Comm: syz.0.0 Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0 PREEMPT(full) [ 85.885483][ T5360] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 85.885491][ T5360] Call Trace: [ 85.885499][ T5360] [ 85.885505][ T5360] dump_stack_lvl+0x189/0x250 [ 85.885525][ T5360] ? __pfx_dump_stack_lvl+0x10/0x10 [ 85.885539][ T5360] ? __pfx__printk+0x10/0x10 [ 85.885556][ T5360] ? print_lock_name+0xde/0x100 [ 85.885570][ T5360] print_circular_bug+0x2ee/0x310 [ 85.885584][ T5360] check_noncircular+0x134/0x160 [ 85.885598][ T5360] validate_chain+0xb9b/0x2140 [ 85.885609][ T5360] ? do_raw_spin_lock+0x121/0x290 [ 85.885624][ T5360] ? look_up_lock_class+0x74/0x170 [ 85.885640][ T5360] ? register_lock_class+0x51/0x320 [ 85.885658][ T5360] __lock_acquire+0xab9/0xd20 [ 85.885686][ T5360] ? __flush_work+0xd2/0xbc0 [ 85.885699][ T5360] lock_acquire+0x120/0x360 [ 85.885715][ T5360] ? __flush_work+0xd2/0xbc0 [ 85.885729][ T5360] ? _raw_spin_unlock_irq+0x23/0x50 [ 85.885749][ T5360] ? __flush_work+0xd2/0xbc0 [ 85.885761][ T5360] __flush_work+0x6b8/0xbc0 [ 85.885773][ T5360] ? __flush_work+0xd2/0xbc0 [ 85.885786][ T5360] ? __flush_work+0xd2/0xbc0 [ 85.885800][ T5360] ? __pfx___flush_work+0x10/0x10 [ 85.885812][ T5360] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.885827][ T5360] ? __pfx___cancel_work+0x10/0x10 [ 85.885840][ T5360] ? lockdep_hardirqs_on+0x9c/0x150 [ 85.885855][ T5360] ? l2cap_conn_del+0x3db/0x680 [ 85.885875][ T5360] __cancel_work_sync+0xbe/0x110 [ 85.885890][ T5360] l2cap_conn_del+0x4f0/0x680 [ 85.885911][ T5360] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.885927][ T5360] hci_conn_hash_flush+0x10a/0x230 [ 85.885944][ T5360] hci_dev_close_sync+0xaef/0x1330 [ 85.885962][ T5360] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.885977][ T5360] ? do_raw_read_unlock+0x3d/0x80 [ 85.885992][ T5360] hci_dev_close+0x108/0x200 [ 85.886008][ T5360] sock_do_ioctl+0xdc/0x300 [ 85.886022][ T5360] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.886033][ T5360] ? __lock_acquire+0xab9/0xd20 [ 85.886052][ T5360] sock_ioctl+0x576/0x790 [ 85.886063][ T5360] ? __pfx_sock_ioctl+0x10/0x10 [ 85.886074][ T5360] ? __fget_files+0x2a/0x420 [ 85.886090][ T5360] ? __fget_files+0x3a0/0x420 [ 85.886104][ T5360] ? __fget_files+0x2a/0x420 [ 85.886119][ T5360] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.886131][ T5360] ? __pfx_sock_ioctl+0x10/0x10 [ 85.886142][ T5360] __se_sys_ioctl+0xf9/0x170 [ 85.886155][ T5360] do_syscall_64+0xfa/0x3b0 [ 85.886171][ T5360] ? lockdep_hardirqs_on+0x9c/0x150 [ 85.886184][ T5360] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.886195][ T5360] ? clear_bhb_loop+0x60/0xb0 [ 85.886209][ T5360] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.886221][ T5360] RIP: 0033:0x7f3a7e38ebe9 [ 85.886233][ T5360] 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.886243][ T5360] RSP: 002b:00007f3a7f22d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.886256][ T5360] RAX: ffffffffffffffda RBX: 00007f3a7e5b5fa0 RCX: 00007f3a7e38ebe9 [ 85.886265][ T5360] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 85.886272][ T5360] RBP: 00007f3a7e411e19 R08: 0000000000000000 R09: 0000000000000000 [ 85.886278][ T5360] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.886286][ T5360] R13: 00007f3a7e5b6038 R14: 00007f3a7e5b5fa0 R15: 00007ffd741d3138 [ 85.886298][ T5360] [ 86.079461][ C0] Illegal XDP return value 16128 on prog (id 2) dev veth1_to_team, expect packet loss! [ 86.610630][ T10] cfg80211: failed to load regulatory.db [ 87.648813][ T45] Bluetooth: hci0: command tx timeout [ 89.728755][ T45] Bluetooth: hci0: command tx timeout [ 91.808327][ T45] Bluetooth: hci0: command tx timeout