diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2022-03-02 13:24:37 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2022-03-02 13:24:37 -0800 |
| commit | 8bbe98bdccef0bb4fe88c666c28a3d4fe51151f7 (patch) | |
| tree | 81b456d3fc63e54aaefe5a49187a8053474abfc6 /arch/x86/net/bpf_jit_comp.c | |
| parent | 530e214c5b5acbfaf819d884b196f3c61f5eca3d (diff) | |
| parent | 676b2daabaf9a993db0e02a5ce79b984aaa0388b (diff) | |
Merge branch 'fixes for bpf_prog_pack'
Song Liu says:
====================
Changes v1 => v2:
1. Rephrase comments in 2/2. (Yonghong)
Two fixes for bpf_prog_pack.
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'arch/x86/net/bpf_jit_comp.c')
| -rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index c7db0fe4de2f..e6ff8f4f9ea4 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -2330,8 +2330,11 @@ skip_init_addrs: if (proglen <= 0) { out_image: image = NULL; - if (header) + if (header) { + bpf_arch_text_copy(&header->size, &rw_header->size, + sizeof(rw_header->size)); bpf_jit_binary_pack_free(header, rw_header); + } prog = orig_prog; goto out_addrs; } |
