[PATCH] bpf, arm64: Fix text_mutex critical section in bpf_arch_text_poke()

bot+bpf-ci at kernel.org bot+bpf-ci at kernel.org
Thu Oct 1 22:16:16 PDT 2026


> bpf, arm64: Fix text_mutex critical section in bpf_arch_text_poke()

TL;DR: Nit only: the new multi-line comment in bpf_arch_text_poke() (arm64
JIT) should put '/*' on its own line, per BPF comment style. No functional
problems found.

> diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
> --- a/arch/arm64/net/bpf_jit_comp.c
> +++ b/arch/arm64/net/bpf_jit_comp.c

[ ... ]

> @@ -3338,12 +3338,20 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type old_t,
>  		 */
>  		plt_target = (u64)&dummy_tramp;
>
> +	/* pages of the bpf prog pack are shared between progs, so the
> +	 * set_memory_rw()/set_memory_ro() window below must be serialized
> +	 * against other pokers too.
> +	 */
> +	mutex_lock(&text_mutex);
> +

This isn't a bug, but should the new multi-line comment put '/*' on a line
by itself, as is the convention for BPF code?

	/*
	 * Pages of the bpf prog pack are shared between progs, so the
	 * set_memory_rw()/set_memory_ro() window below must be serialized
	 * against other pokers too.
	 */

[ ... ]


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/36966917973


More information about the linux-arm-kernel mailing list