aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <egtvedt@samfundet.no>2013-05-13 22:22:10 +0200
committerBen Hutchings <ben@decadent.org.uk>2013-05-30 14:34:58 +0100
commit151a475dab0a3fd7581065a3345dd58037afe69b (patch)
treee20fd9eb5ccbf5636a458c09eaf203fa77b88356
parent834605405a206ad927ca0056c15c70fd73820e46 (diff)
downloadkernel_samsung_smdk4412-151a475dab0a3fd7581065a3345dd58037afe69b.zip
kernel_samsung_smdk4412-151a475dab0a3fd7581065a3345dd58037afe69b.tar.gz
kernel_samsung_smdk4412-151a475dab0a3fd7581065a3345dd58037afe69b.tar.bz2
avr32: fix relocation check for signed 18-bit offset
commit e68c636d88db3fda74e664ecb1a213ae0d50a7d8 upstream. Caught by static code analysis by David. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--arch/avr32/kernel/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c
index 596f730..2c94129 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;