Skip to content

Commit 5ee7f78

Browse files
4astborkmann
authored andcommitted
bpf: arm64: fix uninitialized variable
fix the following issue: arch/arm64/net/bpf_jit_comp.c: In function 'bpf_int_jit_compile': arch/arm64/net/bpf_jit_comp.c:982:18: error: 'image_size' may be used uninitialized in this function [-Werror=maybe-uninitialized] Fixes: db49694 ("bpf: arm64: add JIT support for multi-function programs") Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent fa2d41a commit 5ee7f78

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/arm64/net/bpf_jit_comp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
897897
image_ptr = jit_data->image;
898898
header = jit_data->header;
899899
extra_pass = true;
900+
image_size = sizeof(u32) * ctx.idx;
900901
goto skip_init_ctx;
901902
}
902903
memset(&ctx, 0, sizeof(ctx));

0 commit comments

Comments
 (0)