kernel-ark/arch
Robert Hentosh 7ca97c6131 [PATCH] x86_64: Fix off by one in bad_addr checking in find_e820_area
From: Robert Hentosh <robert_hentosh@dell.com>

Actually, we just stumbled on a different bug found in find_e820_area() in
e820.c.  The following code does not handle the edge condition correctly:

   while (bad_addr(&addr, size) && addr+size < ei->addr + ei->size)
       ;
   last = addr + size;
   if ( last > ei->addr + ei->size )
       continue;

The second statement in the while loop needs to be a <= b so that it is the
logical negavite of the if (a > b) outside it. It needs to read:

   while (bad_addr(&addr, size) && addr+size <= ei->addr + ei->size)
       ;

In the case that failed bad_addr was returning an address that is exactly size
bellow the end of the e820 range.

AK: Again together with the earlier avoid edma fix this fixes
boot on a Dell PE6850/16GB

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-30 20:31:06 -07:00
..
alpha [PATCH] Alpha: strncpy() fix 2006-04-25 07:51:06 -07:00
arm [ARM] 3530/1: PXA Mainstone: prevent double enable_irq() in pcmcia 2006-05-17 20:14:29 +01:00
arm26 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
cris [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
frv [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
h8300 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
i386 [PATCH] i386: apic= command line option should always be 2006-05-30 20:31:05 -07:00
ia64 [IA64] one-line cleanup on set_irq_affinity_info 2006-05-17 06:20:59 -07:00
m32r [PATCH] m32r: update switch_to macro for tuning 2006-04-19 09:13:51 -07:00
m68k [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
m68knommu [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
mips [PATCH] drop task argument of audit_syscall_{entry,exit} 2006-05-01 06:06:18 -04:00
parisc [PARISC] Add new entries to the syscall table 2006-04-21 22:20:35 +00:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-05-27 09:40:40 -07:00
ppc ppc: Fix typo in TI_LOCAL_FLAGS definition 2006-05-29 08:42:34 +10:00
s390 [PATCH] s390: fix typo in stop_hz_timer. 2006-05-25 12:09:55 -07:00
sh [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sh64 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sparc [SPARC]: Add robust futex syscall entries. 2006-05-21 21:22:53 -07:00
sparc64 [SPARC64]: Respect gfp_t argument to dma_alloc_coherent(). 2006-05-23 02:07:22 -07:00
um [PATCH] uml: change timer initialization 2006-05-03 20:05:40 -07:00
v850 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
x86_64 [PATCH] x86_64: Fix off by one in bad_addr checking in find_e820_area 2006-05-30 20:31:06 -07:00
xtensa [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00