module: fix validate_section_offset() overflow bug on 64-bit
[linux-2.6-microblaze.git] / kernel / module.c
index 5c26a76..c7ad738 100644 (file)
@@ -2942,7 +2942,11 @@ static int module_sig_check(struct load_info *info, int flags)
 
 static int validate_section_offset(struct load_info *info, Elf_Shdr *shdr)
 {
+#if defined(CONFIG_64BIT)
+       unsigned long long secend;
+#else
        unsigned long secend;
+#endif
 
        /*
         * Check for both overflow and offset/size being