====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/4191 is trying to acquire lock: ffff88807ad6ca38 (&trie->lock){..-.}-{2:2}, at: trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880b90280d8 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x123/0x270 kernel/time/timer.c:946 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&base->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_timer_base+0x123/0x270 kernel/time/timer.c:946 __mod_timer+0x117/0xd20 kernel/time/timer.c:1019 queue_delayed_work_on+0x126/0x1e0 kernel/workqueue.c:1715 queue_delayed_work include/linux/workqueue.h:527 [inline] schedule_delayed_work include/linux/workqueue.h:631 [inline] kvfree_call_rcu+0x4a9/0x7c0 kernel/rcu/tree.c:3629 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 bpf_dispatcher_xdp+0x5c2/0x1000 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_run3+0x17e/0x320 kernel/trace/bpf_trace.c:1916 __bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138 trace_kmem_cache_free include/trace/events/kmem.h:138 [inline] kmem_cache_free+0x1e7/0x210 mm/slub.c:3521 kfree_skb include/linux/skbuff.h:1118 [inline] tipc_msg_reverse+0x69d/0x900 net/tipc/msg.c:669 tipc_sk_respond+0xee/0x2f0 net/tipc/socket.c:292 __tipc_shutdown+0xf78/0x1510 net/tipc/socket.c:590 tipc_release+0x2e1/0x1fc0 net/tipc/socket.c:642 __sock_release net/socket.c:651 [inline] sock_close+0xd5/0x240 net/socket.c:1346 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 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_1c0c44170264bb34+0x3d/0x298 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_run3+0x17e/0x320 kernel/trace/bpf_trace.c:1916 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x394/0x520 kernel/time/timer.c:586 internal_add_timer kernel/time/timer.c:611 [inline] __mod_timer+0x8e1/0xd20 kernel/time/timer.c:1062 mrp_join_timer_arm net/802/mrp.c:596 [inline] mrp_join_timer+0x142/0x180 net/802/mrp.c:611 call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1767 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780 handle_softirqs+0x328/0x820 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 __sanitizer_cov_trace_switch+0xd1/0xe0 kernel/kcov.c:-1 vsnprintf+0x10e/0x1a00 lib/vsprintf.c:2767 tomoyo_supervisor+0x143/0x10d0 security/tomoyo/common.c:2069 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x25a/0x380 security/tomoyo/file.c:587 tomoyo_path_perm+0x3d9/0x510 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_statx+0x149/0x4d0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat fs/stat.c:411 [inline] __se_sys_newfstatat fs/stat.c:405 [inline] __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405 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 --> &base->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&base->lock); lock(krc.lock); lock(&base->lock); lock(&trie->lock); *** DEADLOCK *** 5 locks held by syz-executor/4191: #0: ffffffff8c6ad298 (tomoyo_ss){....}-{0:0}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 #1: ffffc90000007be0 ((&app->join_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline] #1: ffffc90000007be0 ((&app->join_timer)){+.-.}-{0:0}, at: call_timer_fn+0xbb/0x530 kernel/time/timer.c:1441 #2: ffff88806222a0c8 (&app->lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] #2: ffff88806222a0c8 (&app->lock){+.-.}-{2:2}, at: mrp_join_timer+0xd2/0x180 net/802/mrp.c:609 #3: ffff8880b90280d8 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x123/0x270 kernel/time/timer.c:946 #4: ffffffff8c11c760 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 stack backtrace: CPU: 0 PID: 4191 Comm: syz-executor 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_1c0c44170264bb34+0x3d/0x298 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_run3+0x17e/0x320 kernel/trace/bpf_trace.c:1916 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x394/0x520 kernel/time/timer.c:586 internal_add_timer kernel/time/timer.c:611 [inline] __mod_timer+0x8e1/0xd20 kernel/time/timer.c:1062 mrp_join_timer_arm net/802/mrp.c:596 [inline] mrp_join_timer+0x142/0x180 net/802/mrp.c:611 call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1767 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780 handle_softirqs+0x328/0x820 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 RIP: 0010:__sanitizer_cov_trace_switch+0xd1/0xe0 kernel/kcov.c:-1 Code: 49 c1 e6 05 4d 8d 66 28 4d 39 fc 77 9d 4b 89 4c 33 08 4f 89 54 33 10 4b 89 7c 33 18 4b 89 54 33 20 48 ff c3 49 89 1b eb 81 5b <41> 5c 41 5e 41 5f c3 0f 1f 84 00 00 00 00 00 c7 87 10 16 00 00 00 RSP: 0018:ffffc90002ecf6d0 EFLAGS: 00000246 RAX: 0000000000000012 RBX: ffff0a00ffffff04 RCX: 0000000000000001 RDX: ffffffff83fdcc8e RSI: ffffffff8c73b780 RDI: 0000000000000004 RBP: ffffffff8a538907 R08: ffff888066d80000 R09: 0000000000000012 R10: 0000000000000012 R11: 0000000000000000 R12: 0000000000000004 R13: ffffc90002ecf885 R14: 0000000000000002 R15: ffffffff8a538905 vsnprintf+0x10e/0x1a00 lib/vsprintf.c:2767 tomoyo_supervisor+0x143/0x10d0 security/tomoyo/common.c:2069 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x25a/0x380 security/tomoyo/file.c:587 tomoyo_path_perm+0x3d9/0x510 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_statx+0x149/0x4d0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat fs/stat.c:411 [inline] __se_sys_newfstatat fs/stat.c:405 [inline] __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405 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:0x7fbff155ae3a Code: 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 0b 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca b8 06 01 00 00 0f 05 <3d> 00 f0 ff ff 77 07 31 c0 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 RSP: 002b:00007ffce2cf6bd8 EFLAGS: 00000206 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbff155ae3a RDX: 00007ffce2cf6be0 RSI: 00007fbff161df82 RDI: 0000000000000003 RBP: 00007ffce2cf6be0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000206 R12: 00007ffce2cf7de0 R13: 00007fbff15e0d7d R14: 00000000000582c2 R15: 00007ffce2cf7e20 ---------------- Code disassembly (best guess): 0: 49 c1 e6 05 shl $0x5,%r14 4: 4d 8d 66 28 lea 0x28(%r14),%r12 8: 4d 39 fc cmp %r15,%r12 b: 77 9d ja 0xffffffaa d: 4b 89 4c 33 08 mov %rcx,0x8(%r11,%r14,1) 12: 4f 89 54 33 10 mov %r10,0x10(%r11,%r14,1) 17: 4b 89 7c 33 18 mov %rdi,0x18(%r11,%r14,1) 1c: 4b 89 54 33 20 mov %rdx,0x20(%r11,%r14,1) 21: 48 ff c3 inc %rbx 24: 49 89 1b mov %rbx,(%r11) 27: eb 81 jmp 0xffffffaa 29: 5b pop %rbx * 2a: 41 5c pop %r12 <-- trapping instruction 2c: 41 5e pop %r14 2e: 41 5f pop %r15 30: c3 ret 31: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 38: 00 39: c7 .byte 0xc7 3a: 87 10 xchg %edx,(%rax) 3c: 16 (bad) 3d: 00 00 add %al,(%rax)