public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [3/4] i386: Fix overflow in e820_all_mapped
@ 2006-04-28  5:28 Andi Kleen
  2006-04-28  5:39 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2006-04-28  5:28 UTC (permalink / raw)
  To: torvalds; +Cc: discuss, akpm, linux-kernel


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 <ak@suse.de>

---
 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__*/
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-28 14:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-28  5:28 [PATCH] [3/4] i386: Fix overflow in e820_all_mapped Andi Kleen
2006-04-28  5:39 ` Linus Torvalds
2006-04-28  6:08   ` Andi Kleen
2006-04-28 14:52     ` Linus Torvalds
2006-04-28  7:07   ` [discuss] " Jan Beulich
2006-04-28  7:34     ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox