summaryrefslogtreecommitdiff
path: root/arch/arm64
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2017-12-18 10:09:44 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2017-12-19 01:29:25 +0100
commit5ee7f784cd32e63fbf54275b2b4f991ca085db61 (patch)
tree85df5b8abcee49d92f5b85bc38af1d80d9f93ede /arch/arm64
parentfa2d41adb953235c4acaa98f6c980fd9eabe0062 (diff)
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: db496944fdaa ("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>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/net/bpf_jit_comp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 396490cf7316..acaa935ed977 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -897,6 +897,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
image_ptr = jit_data->image;
header = jit_data->header;
extra_pass = true;
+ image_size = sizeof(u32) * ctx.idx;
goto skip_init_ctx;
}
memset(&ctx, 0, sizeof(ctx));