Patch "MIPS: bpf: Fix uninitialised target compiler error" has been added to the 4.13-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
MIPS: bpf: Fix uninitialised target compiler error
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mips-bpf-fix-uninitialised-target-compiler-error.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
94c3390ab84a6b449accc7351ffda4a0c17bdb92Mon Sep 17 00:00:00 2001
From: Matt Redfearn <[email protected]>
Date: Wed, 27 Sep 2017 09:14:58 +0100
Subject: MIPS: bpf: Fix uninitialised target compiler error
From: Matt Redfearn <[email protected]>
commit 94c3390ab84a6b449accc7351ffda4a0c17bdb92 upstream.
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.
Patchwork: https://patchwork.linux-mips.org/patch/17375/
--- arch/mips/net/ebpf_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/net/ebpf_jit.c +1 -1
@@ -679,7 +679,7 @@ static int build_one_insn(const struct b {int src, dst, r, td, ts, mem_off, b_off;bool need_swap, did_move, cmp_eq; -unsigned int target; +unsigned int target =0 ;u64 t64;s64 t64s;
Patches currently in stable-queue which might be from [email protected] are
queue-4.13/mips-bpf-fix-uninitialised-target-compiler-error.patch