diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-03-30 18:50:28 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-02 13:55:19 -0700 |
commit | 393c20529ebe898fb975744ed0aad5bdd953f232 (patch) | |
tree | 1ad438e100c7e950cd75f3b9070c895a8a4f86e3 /arch | |
parent | 4a78cb55e52d24c37126f456a710c7d6b9babbb4 (diff) |
x86: fix 64k corruption-check
upstream commit: 6d7942dc2a70a7e74c352107b150265602671588
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@kernel.org>
Cc: <stable@kernel.org>
LKML-Reference: <49BC2279.2030101@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 2ac0ab71412..a7a50b24eb9 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 == 0) 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; |