]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
MIPS: bpf: Fix a typo in build_one_insn()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 13 Oct 2017 09:25:17 +0000 (09:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 09:17:18 +0000 (10:17 +0100)
commit 6a2932a463d526e362a6b4e112be226f1d18d088 upstream.

Fix a typo in build_one_insn().

Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Patchwork: https://patchwork.linux-mips.org/patch/17491/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/net/ebpf_jit.c

index 401776f9228865b23bbfa8466cc4101b3761394e..e45f05cc510d7bb5603a03de3b6d5a4ec39f6123 100644 (file)
@@ -1485,7 +1485,7 @@ ld_skb_common:
                }
                src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
                if (src < 0)
-                       return dst;
+                       return src;
                if (BPF_MODE(insn->code) == BPF_XADD) {
                        switch (BPF_SIZE(insn->code)) {
                        case BPF_W: