====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.22/4390 is trying to acquire lock: ffff88807c8fb238 (&trie->lock){-...}-{2:2} , at: trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880b902a258 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1689 [inline] ffff8880b902a258 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x5ff/0xc40 kernel/time/hrtimer.c:1749 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (hrtimer_bases.lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 lock_hrtimer_base kernel/time/hrtimer.c:168 [inline] hrtimer_start_range_ns+0xff/0xc20 kernel/time/hrtimer.c:1284 hrtimer_start include/linux/hrtimer.h:420 [inline] run_page_cache_worker kernel/rcu/tree.c:3492 [inline] kvfree_call_rcu+0x60d/0x7c0 kernel/rcu/tree.c:3603 rtnl_register_internal+0x489/0x590 net/core/rtnetlink.c:225 rtnl_register+0x2e/0x70 net/core/rtnetlink.c:275 ip_rt_init+0x2e0/0x3a0 net/ipv4/route.c:3798 ip_init+0xa/0x20 net/ipv4/ip_output.c:1749 inet_init+0x28b/0x3a0 net/ipv4/af_inet.c:2007 do_one_initcall+0x1ee/0x680 init/main.c:1316 do_initcall_level+0x137/0x1f0 init/main.c:1389 do_initcalls+0x4b/0x90 init/main.c:1405 kernel_init_freeable+0x3ce/0x560 init/main.c:1629 kernel_init+0x19/0x1b0 init/main.c:1520 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #1 (krc.lock){..-.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:3203 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3510 [inline] kvfree_call_rcu+0x186/0x7c0 kernel/rcu/tree.c:3601 trie_delete_elem+0x58c/0x710 kernel/bpf/lpm_trie.c:-1 0xffffffffa002ad76 bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run2+0x15b/0x2d0 kernel/trace/bpf_trace.c:1915 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118 trace_kfree include/trace/events/kmem.h:118 [inline] kfree+0x25f/0x2a0 mm/slub.c:4554 skb_free_head net/core/skbuff.c:655 [inline] pskb_expand_head+0x358/0x10f0 net/core/skbuff.c:1742 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1299 netlink_broadcast_filtered+0x7c/0x1170 net/netlink/af_netlink.c:1511 netlink_broadcast net/netlink/af_netlink.c:1556 [inline] nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0xec/0x1a0 net/netlink/af_netlink.c:2550 rtnl_notify net/core/rtnetlink.c:761 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3910 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3925 [inline] rtnetlink_event+0x13a/0x1a0 net/core/rtnetlink.c:5735 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_set_mac_address+0x2c4/0x3d0 net/core/dev.c:9114 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:9128 do_setlink+0x80d/0x3980 net/core/rtnetlink.c:2736 __rtnl_newlink net/core/rtnetlink.c:3452 [inline] rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3574 rtnetlink_rcv_msg+0x7ff/0xe90 net/core/rtnetlink.c:5684 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2507 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] __sys_sendto+0x423/0x580 net/socket.c:2073 __do_sys_sendto net/socket.c:2085 [inline] __se_sys_sendto net/socket.c:2081 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2081 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&trie->lock){-...}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_2c29ac5cdc6b1842+0x3a/0x32c bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run2+0x15b/0x2d0 kernel/trace/bpf_trace.c:1915 trace_hrtimer_start include/trace/events/timer.h:199 [inline] debug_activate kernel/time/hrtimer.c:466 [inline] enqueue_hrtimer+0x314/0x370 kernel/time/hrtimer.c:1069 __run_hrtimer kernel/time/hrtimer.c:1702 [inline] __hrtimer_run_queues+0x65a/0xc40 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x3bb/0x8d0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1097 [inline] __sysvec_apic_timer_interrupt+0x137/0x4a0 arch/x86/kernel/apic/apic.c:1114 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0x9b/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 smp_call_function_many_cond+0x703/0xd70 kernel/smp.c:913 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1134 on_each_cpu include/linux/smp.h:71 [inline] text_poke_sync arch/x86/kernel/alternative.c:1442 [inline] text_poke_bp_batch+0x533/0x7c0 arch/x86/kernel/alternative.c:1704 text_poke_flush arch/x86/kernel/alternative.c:1833 [inline] text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1840 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146 static_key_enable_cpuslocked+0x11f/0x240 kernel/jump_label.c:177 static_key_enable+0x16/0x20 kernel/jump_label.c:190 tracepoint_add_func+0x83b/0x9a0 kernel/tracepoint.c:361 tracepoint_probe_register_prio_may_exist+0x5c/0x90 kernel/tracepoint.c:482 bpf_raw_tracepoint_open+0x69d/0x780 kernel/bpf/syscall.c:3119 __sys_bpf+0x48b/0x670 kernel/bpf/syscall.c:4699 __do_sys_bpf kernel/bpf/syscall.c:4761 [inline] __se_sys_bpf kernel/bpf/syscall.c:4759 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4759 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: &trie->lock --> krc.lock --> hrtimer_bases.lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hrtimer_bases.lock); lock(krc.lock); lock(hrtimer_bases.lock); lock(&trie->lock); *** DEADLOCK *** 6 locks held by syz.0.22/4390: #0: ffffffff8c15c4c8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio_may_exist+0x40/0x90 kernel/tracepoint.c:478 #1: ffffffff8bfbaed0 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0xe/0x20 kernel/jump_label.c:189 #2: ffffffff8c1a85a8 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #2: ffffffff8c1a85a8 (jump_label_mutex){+.+.}-{3:3}, at: static_key_enable_cpuslocked+0xc2/0x240 kernel/jump_label.c:174 #3: ffffffff8bfd1f88 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_apply+0xe/0x20 arch/x86/kernel/jump_label.c:145 #4: ffff8880b902a258 (hrtimer_bases.lock){-.-.}-{2:2}, at: __run_hrtimer kernel/time/hrtimer.c:1689 [inline] #4: ffff8880b902a258 (hrtimer_bases.lock){-.-.}-{2:2}, at: __hrtimer_run_queues+0x5ff/0xc40 kernel/time/hrtimer.c:1749 #5: ffffffff8c11c760 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 stack backtrace: CPU: 0 PID: 4390 Comm: syz.0.22 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 bpf_prog_2c29ac5cdc6b1842+0x3a/0x32c bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1878 [inline] bpf_trace_run2+0x15b/0x2d0 kernel/trace/bpf_trace.c:1915 trace_hrtimer_start include/trace/events/timer.h:199 [inline] debug_activate kernel/time/hrtimer.c:466 [inline] enqueue_hrtimer+0x314/0x370 kernel/time/hrtimer.c:1069 __run_hrtimer kernel/time/hrtimer.c:1702 [inline] __hrtimer_run_queues+0x65a/0xc40 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x3bb/0x8d0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1097 [inline] __sysvec_apic_timer_interrupt+0x137/0x4a0 arch/x86/kernel/apic/apic.c:1114 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0x9b/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 RIP: 0010:smp_call_function_many_cond+0x703/0xd70 kernel/smp.c:913 Code: 7c 24 34 4d 89 f4 4c 8b 74 24 58 eb 0c e8 95 4a 0b 00 eb 05 e8 8e 4a 0b 00 44 89 ff 4c 89 f6 e8 73 fe 8e 02 3b 05 9d 1d fd 0b <0f> 83 a9 00 00 00 41 89 c7 e8 6f 4a 0b 00 e9 5d fd ff ff e8 65 4a RSP: 0018:ffffc90003b7f880 EFLAGS: 00000206 RAX: 0000000000000008 RBX: 0000000000000001 RCX: ffff88807a848000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90003b7f9c0 R08: dffffc0000000000 R09: ffffed101720767b R10: ffffed101720767b R11: 1ffff1101720767a R12: 0000000000000000 R13: ffff8880b903b3c0 R14: ffff8880b903b3c8 R15: 0000000000000001 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1134 on_each_cpu include/linux/smp.h:71 [inline] text_poke_sync arch/x86/kernel/alternative.c:1442 [inline] text_poke_bp_batch+0x533/0x7c0 arch/x86/kernel/alternative.c:1704 text_poke_flush arch/x86/kernel/alternative.c:1833 [inline] text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1840 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146 static_key_enable_cpuslocked+0x11f/0x240 kernel/jump_label.c:177 static_key_enable+0x16/0x20 kernel/jump_label.c:190 tracepoint_add_func+0x83b/0x9a0 kernel/tracepoint.c:361 tracepoint_probe_register_prio_may_exist+0x5c/0x90 kernel/tracepoint.c:482 bpf_raw_tracepoint_open+0x69d/0x780 kernel/bpf/syscall.c:3119 __sys_bpf+0x48b/0x670 kernel/bpf/syscall.c:4699 __do_sys_bpf kernel/bpf/syscall.c:4761 [inline] __se_sys_bpf kernel/bpf/syscall.c:4759 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4759 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f712da736c9 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 RSP: 002b:00007ffceee7d4d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f712dcc9fa0 RCX: 00007f712da736c9 RDX: 0000000000000018 RSI: 0000200000000040 RDI: 0000000000000011 RBP: 00007f712daf5f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f712dcc9fa0 R14: 00007f712dcc9fa0 R15: 0000000000000003 ---------------- Code disassembly (best guess): 0: 7c 24 jl 0x26 2: 34 4d xor $0x4d,%al 4: 89 f4 mov %esi,%esp 6: 4c 8b 74 24 58 mov 0x58(%rsp),%r14 b: eb 0c jmp 0x19 d: e8 95 4a 0b 00 call 0xb4aa7 12: eb 05 jmp 0x19 14: e8 8e 4a 0b 00 call 0xb4aa7 19: 44 89 ff mov %r15d,%edi 1c: 4c 89 f6 mov %r14,%rsi 1f: e8 73 fe 8e 02 call 0x28efe97 24: 3b 05 9d 1d fd 0b cmp 0xbfd1d9d(%rip),%eax # 0xbfd1dc7 * 2a: 0f 83 a9 00 00 00 jae 0xd9 <-- trapping instruction 30: 41 89 c7 mov %eax,%r15d 33: e8 6f 4a 0b 00 call 0xb4aa7 38: e9 5d fd ff ff jmp 0xfffffd9a 3d: e8 .byte 0xe8 3e: 65 gs 3f: 4a rex.WX