m32r: test below 0 on unsigned relocation
PATCH 7/9 m32r: test below 0 on unsigned relocation
Elf32_Addr relocation is unsigned so the test doesn't work.
Signed-off-by Roel Kluin <[email protected]>
---
arch/m32r/kernel/module.c +2 -2
@@ -172,7 +172,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,break ;case R_M32R_18_PCREL_RELA : relocation = (relocation - (Elf32_Addr ) location); -if (relocation <-0x20000 ||0x1fffc < relocation) +if (relocation >0x1fffc ) {printk (KERN_ERR "module %s: relocation overflow: %u\n" , me->name, relocation);
@@ -204,7 +204,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,break ;case R_M32R_26_PCREL_RELA : relocation = (relocation - (Elf32_Addr ) location); -if (relocation <-0x2000000 ||0x1fffffc < relocation) +if (relocation >0x1fffffc ) {printk (KERN_ERR "module %s: relocation overflow: %u\n" , me->name, relocation);