linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM:net: an issue for k which is u32, never < 0
@ 2013-03-10  2:15 Chen Gang
  2013-03-10 21:12 ` David Miller
  2013-03-11 16:54 ` Mircea Gherzan
  0 siblings, 2 replies; 8+ messages in thread
From: Chen Gang @ 2013-03-10  2:15 UTC (permalink / raw)
  To: linux-arm-kernel


  k is u32 which never < 0, need type cast, or cause issue.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arm/net/bpf_jit_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 6828ef6..a0bd8a7 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);
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-12 15:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-10  2:15 [PATCH] ARM:net: an issue for k which is u32, never < 0 Chen Gang
2013-03-10 21:12 ` David Miller
2013-03-11  4:53   ` Chen Gang
2013-03-11 16:47   ` Russell King - ARM Linux
2013-03-12  0:01     ` Chen Gang
2013-03-12 15:33     ` David Miller
2013-03-11 16:54 ` Mircea Gherzan
2013-03-12  0:01   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).