[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-6d7942dc2a70a7e74c352107b150265602671588@git.kernel.org>
Date: Sun, 15 Mar 2009 06:12:26 GMT
From: Yinghai Lu <yinghai@...nel.org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
yinghai@...nel.org, stable@...nel.org, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:x86/mm] x86: fix 64k corruption-check
Commit-ID: 6d7942dc2a70a7e74c352107b150265602671588
Gitweb: http://git.kernel.org/tip/6d7942dc2a70a7e74c352107b150265602671588
Author: Yinghai Lu <yinghai@...nel.org>
AuthorDate: Sat, 14 Mar 2009 14:32:41 -0700
Commit: Ingo Molnar <mingo@...e.hu>
CommitDate: Sun, 15 Mar 2009 07:03:15 +0100
x86: fix 64k corruption-check
Impact: fix boot crash
Need to exit early if the addr is far above 64k.
The crash got exposed by:
78a8b35: x86: make e820_update_range() handle small range update
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
Cc: <stable@...nel.org>
LKML-Reference: <49BC2279.2030101@...nel.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/kernel/check.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index b617b11..fc999e6 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -86,12 +86,12 @@ void __init setup_bios_corruption_check(void)
if (!(addr + 1))
break;
+ if (addr >= corruption_check_size)
+ break;
+
if ((addr + size) > corruption_check_size)
size = corruption_check_size - addr;
- if (size == 0)
- break;
-
e820_update_range(addr, size, E820_RAM, E820_RESERVED);
scan_areas[num_scan_areas].addr = addr;
scan_areas[num_scan_areas].size = size;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists