Skip to content

Commit 45549a6

Browse files
Chen Gangdavem330
authored andcommitted
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 <gang.chen@asianux.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Mircea Gherzan <mgherzan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3f315be commit 45549a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/net/bpf_jit_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static int build_body(struct jit_ctx *ctx)
576576
/* x = ((*(frame + k)) & 0xf) << 2; */
577577
ctx->seen |= SEEN_X | SEEN_DATA | SEEN_CALL;
578578
/* the interpreter should deal with the negative K */
579-
if (k < 0)
579+
if ((int)k < 0)
580580
return -1;
581581
/* offset in r1: we might have to take the slow path */
582582
emit_mov_i(r_off, k, ctx);

0 commit comments

Comments
 (0)