diff options
author | Song Liu <[email protected]> | 2022-03-02 09:51:26 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2022-03-02 13:24:37 -0800 |
commit | 676b2daabaf9a993db0e02a5ce79b984aaa0388b (patch) | |
tree | 81b456d3fc63e54aaefe5a49187a8053474abfc6 /drivers/fpga/fpga-bridge.c | |
parent | eed1fcee556fd8569afe94178b0c2784a5a6b717 (diff) |
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 <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions