Преглед на файлове

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
Hans-Christian Egtvedt преди 12 години
родител
ревизия
e68c636d88
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      arch/avr32/kernel/module.c

+ 1 - 1
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;