From: Hans-Christian Egtvedt Date: Mon, 13 May 2013 20:22:10 +0000 (+0200) Subject: avr32: fix relocation check for signed 18-bit offset X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=e68c636d88db3fda74e664ecb1a213ae0d50a7d8;p=deliverable%2Flinux.git avr32: fix relocation check for signed 18-bit offset Caught by static code analysis by David. Reported-by: David Binderman Signed-off-by: Hans-Christian Egtvedt Cc: stable@kernel.org --- diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c index 596f7305d93f..2c9412908024 100644 --- a/arch/avr32/kernel/module.c +++ b/arch/avr32/kernel/module.c @@ -264,7 +264,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, break; case R_AVR32_GOT18SW: if ((relocation & 0xfffe0003) != 0 - && (relocation & 0xfffc0003) != 0xffff0000) + && (relocation & 0xfffc0000) != 0xfffc0000) return reloc_overflow(module, "R_AVR32_GOT18SW", relocation); relocation >>= 2;