From: Chen Gang Date: Sun, 10 Mar 2013 02:15:54 +0000 (+0800) Subject: ARM:net: an issue for k which is u32, never < 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45549a68a592dd1daed72aaf4df2295931b93138;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM:net: an issue for k which is u32, never < 0 k is u32 which never < 0, need type cast, or cause issue. Signed-off-by: Chen Gang Acked-by: Russell King Acked-by: Mircea Gherzan Signed-off-by: David S. Miller --- diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 6828ef6ce80e..a0bd8a755bdf 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -576,7 +576,7 @@ load_ind: /* x = ((*(frame + k)) & 0xf) << 2; */ ctx->seen |= SEEN_X | SEEN_DATA | SEEN_CALL; /* the interpreter should deal with the negative K */ - if (k < 0) + if ((int)k < 0) return -1; /* offset in r1: we might have to take the slow path */ emit_mov_i(r_off, k, ctx);