aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <egtvedt@samfundet.no>2013-05-13 16:22:10 -0400
committerHans-Christian Egtvedt <egtvedt@samfundet.no>2013-05-13 16:22:10 -0400
commite68c636d88db3fda74e664ecb1a213ae0d50a7d8 (patch)
tree0ece5326637b21b485048ab95824ead08f889e38 /arch/avr32
parentd6ffe1b8ecc59ae23524e408063dc7725f485f96 (diff)
avr32: fix relocation check for signed 18-bit offset
Caught by static code analysis by David. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: stable@kernel.org
Diffstat (limited to 'arch/avr32')
-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 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,
264 break; 264 break;
265 case R_AVR32_GOT18SW: 265 case R_AVR32_GOT18SW:
266 if ((relocation & 0xfffe0003) != 0 266 if ((relocation & 0xfffe0003) != 0
267 && (relocation & 0xfffc0003) != 0xffff0000) 267 && (relocation & 0xfffc0000) != 0xfffc0000)
268 return reloc_overflow(module, "R_AVR32_GOT18SW", 268 return reloc_overflow(module, "R_AVR32_GOT18SW",
269 relocation); 269 relocation);
270 relocation >>= 2; 270 relocation >>= 2;