[PATCH] [3/4] i386: Fix overflow in e820_all_mapped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 32bit version of e820_all_mapped() needs to use u64 to avoid
overflows on PAE systems.  Pointed out by Jan Beulich

Signed-off-by: Andi Kleen <[email protected]>

---
 arch/i386/kernel/setup.c |    2 +-
 include/asm-i386/e820.h  |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Index: linux/arch/i386/kernel/setup.c
===================================================================
--- linux.orig/arch/i386/kernel/setup.c
+++ linux/arch/i386/kernel/setup.c
@@ -970,7 +970,7 @@ efi_memory_present_wrapper(unsigned long
   * not-overlapping, which is the case
   */
 int __init
-e820_all_mapped(unsigned long start, unsigned long end, unsigned type)
+e820_all_mapped(u64 start, u64 end, unsigned type)
 {
 	int i;
 	for (i = 0; i < e820.nr_map; i++) {
Index: linux/include/asm-i386/e820.h
===================================================================
--- linux.orig/include/asm-i386/e820.h
+++ linux/include/asm-i386/e820.h
@@ -36,8 +36,7 @@ struct e820map {
 
 extern struct e820map e820;
 
-extern int e820_all_mapped(unsigned long start, unsigned long end,
-			   unsigned type);
+extern int e820_all_mapped(u64 start, u64 end, unsigned type);
 
 #endif/*!__ASSEMBLY__*/
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux