aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/check.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-03-14 17:32:41 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-15 02:03:15 -0400
commit6d7942dc2a70a7e74c352107b150265602671588 (patch)
treef7df27a6e206061fcdecf2df71e46824098386b7 /arch/x86/kernel/check.c
parent78a8b35bc7abf8b8333d6f625e08c0f7cc1c3742 (diff)
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@kernel.org> Cc: <stable@kernel.org> LKML-Reference: <49BC2279.2030101@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/check.c')
-rw-r--r--arch/x86/kernel/check.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index b617b1164f1e..fc999e6fc46a 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -86,12 +86,12 @@ void __init setup_bios_corruption_check(void)
86 if (!(addr + 1)) 86 if (!(addr + 1))
87 break; 87 break;
88 88
89 if (addr >= corruption_check_size)
90 break;
91
89 if ((addr + size) > corruption_check_size) 92 if ((addr + size) > corruption_check_size)
90 size = corruption_check_size - addr; 93 size = corruption_check_size - addr;
91 94
92 if (size == 0)
93 break;
94
95 e820_update_range(addr, size, E820_RAM, E820_RESERVED); 95 e820_update_range(addr, size, E820_RAM, E820_RESERVED);
96 scan_areas[num_scan_areas].addr = addr; 96 scan_areas[num_scan_areas].addr = addr;
97 scan_areas[num_scan_areas].size = size; 97 scan_areas[num_scan_areas].size = size;