* [PATCH] x86: fix early_reserve_e820()
@ 2009-05-06 12:02 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2009-05-06 12:02 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
Impact: bug fix
If the first non-reserved (sub-)range doesn't fit the size requested,
an endless loop will be entered. If a range returned from
find_e820_area_size() turns out insufficient in size, the range must
be skipped before calling the function again.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
arch/x86/kernel/e820.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- linux-2.6.30-rc4/arch/x86/kernel/e820.c 2009-04-30 09:42:42.000000000 +0200
+++ 2.6.30-rc4-x86-early-reserve-e820/arch/x86/kernel/e820.c 2009-05-06 11:25:44.000000000 +0200
@@ -1074,12 +1074,13 @@ u64 __init early_reserve_e820(u64 startt
u64 addr;
u64 start;
- start = startt;
- while (size < sizet && (start + 1))
+ for (start = startt; ; start += size) {
start = find_e820_area_size(start, &size, align);
-
- if (size < sizet)
- return 0;
+ if (!(start + 1))
+ return 0;
+ if (size >= sizet)
+ break;
+ }
#ifdef CONFIG_X86_32
if (start >= MAXMEM)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-06 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-06 12:02 [PATCH] x86: fix early_reserve_e820() Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®