]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL again
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 16 Jul 2025 19:35:06 +0000 (21:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:53:14 +0000 (08:53 +0200)
commit0c7b20f7785cfdd59403333612c90b458b12307c
tree22cf005129c93b5ba1e95ab1a3f899dfeb88d798
parent600f55da8d909f93638c65de3df666969463f806
s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL again

commit 6a5abf8cf182f577c7ae6c62f14debc9754ec986 upstream.

Commit 7ded842b356d ("s390/bpf: Fix bpf_plt pointer arithmetic") has
accidentally removed the critical piece of commit c730fce7c70c
("s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL"), causing
intermittent kernel panics in e.g. perf's on_switch() prog to reappear.

Restore the fix and add a comment.

Fixes: 7ded842b356d ("s390/bpf: Fix bpf_plt pointer arithmetic")
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20250716194524.48109-2-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/net/bpf_jit_comp.c