diff options
author | Song Liu <song@kernel.org> | 2022-02-08 23:05:08 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-02-08 23:52:05 +0100 |
commit | 0f350231b5ac8867d552122b9ec88e8d7da00e8c (patch) | |
tree | 172978961732c65c32330224ca37c8ea19ee02ee /arch/sparc/net | |
parent | libbpf: Fix signedness bug in btf_dump_array_data() (diff) | |
download | linux-0f350231b5ac8867d552122b9ec88e8d7da00e8c.tar.xz linux-0f350231b5ac8867d552122b9ec88e8d7da00e8c.zip |
bpf: Fix leftover header->pages in sparc and powerpc code.
Replace header->pages * PAGE_SIZE with new header->size.
Fixes: ed2d9e1a26cc ("bpf: Use size instead of pages in bpf_binary_header")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220208220509.4180389-2-song@kernel.org
Diffstat (limited to 'arch/sparc/net')
-rw-r--r-- | arch/sparc/net/bpf_jit_comp_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c index b1e38784eb23..fa0759bfe498 100644 --- a/arch/sparc/net/bpf_jit_comp_64.c +++ b/arch/sparc/net/bpf_jit_comp_64.c @@ -1599,7 +1599,7 @@ skip_init_ctx: if (bpf_jit_enable > 1) bpf_jit_dump(prog->len, image_size, pass, ctx.image); - bpf_flush_icache(header, (u8 *)header + (header->pages * PAGE_SIZE)); + bpf_flush_icache(header, (u8 *)header + header->size); if (!prog->is_func || extra_pass) { bpf_jit_binary_lock_ro(header); |