summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <egtvedt@samfundet.no>2013-05-13 22:22:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-07 12:46:34 -0700
commite9a91cb47886388540eaf68f981e7a3d4b04a27c (patch)
treeffddb39879f823bc66bdf7a4e3f6dc8a565f0e9d /arch
parentf9429439e89dd9e7440de0334f3eefcd3a37adf4 (diff)
downloadlinux-stable-e9a91cb47886388540eaf68f981e7a3d4b04a27c.tar.gz
linux-stable-e9a91cb47886388540eaf68f981e7a3d4b04a27c.tar.bz2
linux-stable-e9a91cb47886388540eaf68f981e7a3d4b04a27c.zip
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-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 a727f54d64d6..9c266abc884c 100644
--- a/arch/avr32/kernel/module.c
+++ b/arch/avr32/kernel/module.c
@@ -271,7 +271,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;