kernel_optimize_test/arch/riscv/net
Björn Töpel cac6b043ce riscv, bpf: Fix potential NULL dereference
commit 27de809a3d83a6199664479ebb19712533d6fd9b upstream.

The bpf_jit_binary_free() function requires a non-NULL argument. When
the RISC-V BPF JIT fails to converge in NR_JIT_ITERATIONS steps,
jit_data->header will be NULL, which triggers a NULL
dereference. Avoid this by checking the argument, prior calling the
function.

Fixes: ca6cb5447c ("riscv, bpf: Factor common RISC-V JIT code")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20211028125115.514587-1-bjorn@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-02 19:48:21 +01:00
..
bpf_jit_comp32.c bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-08-04 12:46:44 +02:00
bpf_jit_comp64.c bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-08-04 12:46:44 +02:00
bpf_jit_core.c riscv, bpf: Fix potential NULL dereference 2021-11-02 19:48:21 +01:00
bpf_jit.h bpf, riscv: Add encodings for compressed instructions 2020-07-21 13:26:25 -07:00
Makefile riscv, bpf: Add RV32G eBPF JIT 2020-03-05 16:13:47 +01:00