diff options
author | Matt Redfearn <[email protected]> | 2017-09-27 09:14:58 +0100 |
---|---|---|
committer | Ralf Baechle <[email protected]> | 2017-10-09 14:53:38 +0200 |
commit | 94c3390ab84a6b449accc7351ffda4a0c17bdb92 (patch) | |
tree | f0d37004c667b22456319c4a36f19457a7e78bba /tools/perf/scripts/python | |
parent | 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff) |
MIPS: bpf: Fix uninitialised target compiler error
Compiling ebpf_jit.c with gcc 4.9 results in a (likely spurious)
compiler warning, as gcc has detected that the variable "target" may be
used uninitialised. Since -Werror is active, this is treated as an error
and causes a kernel build failure whenever CONFIG_MIPS_EBPF_JIT is
enabled.
arch/mips/net/ebpf_jit.c: In function 'build_one_insn':
arch/mips/net/ebpf_jit.c:1118:80: error: 'target' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
emit_instr(ctx, j, target);
^
cc1: all warnings being treated as errors
Fix this by initialising "target" to 0. If it really is used
uninitialised this would result in a jump to 0 and a detectable run time
failure.
Signed-off-by: Matt Redfearn <[email protected]>
Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.")
Cc: James Hogan <[email protected]>
Cc: David Daney <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: <[email protected]> # v4.13+
Patchwork: https://patchwork.linux-mips.org/patch/17375/
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions