summaryrefslogtreecommitdiffstats
path: root/kernel/range.c
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2022-03-02 18:51:26 +0100
committerAlexei Starovoitov <ast@kernel.org>2022-03-02 22:24:37 +0100
commit676b2daabaf9a993db0e02a5ce79b984aaa0388b (patch)
tree81b456d3fc63e54aaefe5a49187a8053474abfc6 /kernel/range.c
parentx86: Disable HAVE_ARCH_HUGE_VMALLOC on 32-bit x86 (diff)
downloadlinux-676b2daabaf9a993db0e02a5ce79b984aaa0388b.tar.xz
linux-676b2daabaf9a993db0e02a5ce79b984aaa0388b.zip
bpf, x86: Set header->size properly before freeing it
On do_jit failure path, the header is freed by bpf_jit_binary_pack_free. While bpf_jit_binary_pack_free doesn't require proper ro_header->size, bpf_prog_pack_free still uses it. Set header->size in bpf_int_jit_compile before calling bpf_jit_binary_pack_free. Fixes: 1022a5498f6f ("bpf, x86_64: Use bpf_jit_binary_pack_alloc") Fixes: 33c9805860e5 ("bpf: Introduce bpf_jit_binary_pack_[alloc|finalize|free]") Reported-by: Kui-Feng Lee <kuifeng@fb.com> Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20220302175126.247459-3-song@kernel.org
Diffstat (limited to 'kernel/range.c')
0 files changed, 0 insertions, 0 deletions