====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.1.14553/1750 is trying to acquire lock: ffff8880616c7238 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x90/0x710 kernel/bpf/lpm_trie.c:467 but task is already holding lock: ffff8880b903a358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x2e/0x40 kernel/locking/spinlock.c:368 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 raw_spin_rq_lock kernel/sched/sched.h:1326 [inline] rq_lock kernel/sched/sched.h:1621 [inline] task_fork_fair+0x5c/0x350 kernel/sched/fair.c:11499 sched_cgroup_fork+0x2c6/0x320 kernel/sched/core.c:4485 copy_process+0x22d1/0x3e00 kernel/fork.c:2395 kernel_clone+0x219/0x930 kernel/fork.c:2679 kernel_thread+0xc8/0x120 kernel/fork.c:2731 rest_init+0x21/0x330 init/main.c:720 start_kernel+0x486/0x530 init/main.c:1154 secondary_startup_64_no_verify+0xb1/0xbb -> #4 (&p->pi_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 try_to_wake_up+0x5c/0x1050 kernel/sched/core.c:4049 __wake_up_common+0x2a4/0x4e0 kernel/sched/wait.c:108 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x108/0x180 kernel/sched/wait.c:157 tty_port_default_wakeup+0xa5/0xf0 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x629/0x830 drivers/tty/serial/8250/8250_port.c:1828 serial8250_handle_irq+0x519/0x610 drivers/tty/serial/8250/8250_port.c:1924 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 unwind_get_return_address+0x32/0x80 arch/x86/kernel/unwind_orc.c:323 arch_stack_walk+0xf2/0x140 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0x98/0xe0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] tomoyo_find_next_domain+0x11b/0x1a60 security/tomoyo/domain.c:714 tomoyo_bprm_check_security+0xdd/0x120 security/tomoyo/tomoyo.c:101 security_bprm_check+0x5e/0x90 security/security.c:868 search_binary_handler fs/exec.c:1730 [inline] exec_binprm fs/exec.c:1783 [inline] bprm_execve+0x9f7/0x17d0 fs/exec.c:1852 do_execveat_common+0x51e/0x6d0 fs/exec.c:1957 do_execve fs/exec.c:2027 [inline] __do_sys_execve fs/exec.c:2103 [inline] __se_sys_execve fs/exec.c:2098 [inline] __x64_sys_execve+0x8e/0xa0 fs/exec.c:2098 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 -> #3 (&tty->write_wait){-...}-{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 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xed/0x180 kernel/sched/wait.c:157 tty_port_default_wakeup+0xa5/0xf0 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x629/0x830 drivers/tty/serial/8250/8250_port.c:1828 serial8250_handle_irq+0x519/0x610 drivers/tty/serial/8250/8250_port.c:1924 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] _raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:419 [inline] uart_write+0x62f/0x880 drivers/tty/serial/serial_core.c:592 process_output_block drivers/tty/n_tty.c:592 [inline] n_tty_write+0xd21/0x1210 drivers/tty/n_tty.c:2339 do_tty_write drivers/tty/tty_io.c:1038 [inline] file_tty_write+0x557/0x910 drivers/tty/tty_io.c:1110 call_write_iter include/linux/fs.h:2173 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x712/0xd00 fs/read_write.c:594 ksys_write+0x14d/0x250 fs/read_write.c:647 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 -> #2 (&port_lock_key){-...}-{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 serial8250_console_write+0x170/0xf80 drivers/tty/serial/8250/8250_port.c:3362 call_console_drivers kernel/printk/printk.c:-1 [inline] console_unlock+0xc86/0x1200 kernel/printk/printk.c:2744 vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274 _printk+0xcc/0x110 kernel/printk/printk.c:2299 register_console+0x682/0x960 kernel/printk/printk.c:3107 univ8250_console_init+0x41/0x50 drivers/tty/serial/8250/8250_core.c:690 console_init+0x177/0x5d0 kernel/printk/printk.c:3207 start_kernel+0x2f9/0x530 init/main.c:1090 secondary_startup_64_no_verify+0xb1/0xbb -> #1 (console_owner){-...}-{0:0}: console_lock_spinning_enable+0x51/0x60 kernel/printk/printk.c:1805 console_unlock+0x9f8/0x1200 kernel/printk/printk.c:2741 vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274 _printk+0xcc/0x110 kernel/printk/printk.c:2299 debug_objects_oom+0x89/0x2f0 lib/debugobjects.c:473 debug_object_activate+0x409/0x480 lib/debugobjects.c:699 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] kvfree_call_rcu+0xb5/0x7c0 kernel/rcu/tree.c:3591 trie_update_elem+0x86e/0xc50 kernel/bpf/lpm_trie.c:396 bpf_map_update_value+0x57d/0x650 kernel/bpf/syscall.c:223 generic_map_update_batch+0x525/0x7c0 kernel/bpf/syscall.c:1430 bpf_map_do_batch+0x466/0x600 kernel/bpf/syscall.c:-1 __sys_bpf+0x601/0x670 kernel/bpf/syscall.c:-1 __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 -> #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_f4ebb277092bad9e+0x3f/0xae8 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_tlb_flush+0xe6/0x110 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x6e3/0x9a0 arch/x86/mm/tlb.c:-1 context_switch kernel/sched/core.c:5035 [inline] __schedule+0x1024/0x4390 kernel/sched/core.c:6395 preempt_schedule_common+0x82/0xd0 kernel/sched/core.c:6571 preempt_schedule+0xa7/0xb0 kernel/sched/core.c:6596 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34 __raw_spin_unlock include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock+0x36/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:404 [inline] __text_poke+0x64b/0x7b0 arch/x86/kernel/alternative.c:1389 text_poke arch/x86/kernel/alternative.c:1413 [inline] text_poke_bp_batch+0x138/0x7c0 arch/x86/kernel/alternative.c:1639 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 --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(&trie->lock); *** DEADLOCK *** 6 locks held by syz.1.14553/1750: #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: ffff8880b903a358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 #5: ffffffff8c11c760 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 stack backtrace: CPU: 0 PID: 1750 Comm: syz.1.14553 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_f4ebb277092bad9e+0x3f/0xae8 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_tlb_flush+0xe6/0x110 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x6e3/0x9a0 arch/x86/mm/tlb.c:-1 context_switch kernel/sched/core.c:5035 [inline] __schedule+0x1024/0x4390 kernel/sched/core.c:6395 preempt_schedule_common+0x82/0xd0 kernel/sched/core.c:6571 preempt_schedule+0xa7/0xb0 kernel/sched/core.c:6596 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34 __raw_spin_unlock include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock+0x36/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:404 [inline] __text_poke+0x64b/0x7b0 arch/x86/kernel/alternative.c:1389 text_poke arch/x86/kernel/alternative.c:1413 [inline] text_poke_bp_batch+0x138/0x7c0 arch/x86/kernel/alternative.c:1639 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:0x7fe0a53f6749 Code: Unable to access opcode bytes at RIP 0x7fe0a53f671f. RSP: 002b:00007fe0a365d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fe0a564cfa0 RCX: 00007fe0a53f6749 RDX: 0000000000000010 RSI: 0000200000000080 RDI: 0000000000000011 RBP: 00007fe0a547af91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe0a564d038 R14: 00007fe0a564cfa0 R15: 00007ffe55288a58