summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/check.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2009-03-12 13:07:23 +0000
committerIngo Molnar <mingo@elte.hu>2009-03-13 02:37:19 +0100
commit5c0e6f035df983210e4d22213aed624ced502d3d (patch)
tree6986ed92d5f62f421d3b3be776132994c8c05d6b /arch/x86/kernel/check.c
parent82034d6f59b4772f4233bbb61c670290803a9960 (diff)
x86: fix code paths used by update_mptable
Impact: fix crashes under Xen due to unrobust e820 code find_e820_area_size() must return a properly distinguishable and out-of-bounds value when it fails, and -1UL does not meet that criteria on i386/PAE. Additionally, callers of the function must check against that value. early_reserve_e820() should be prepared for the region found to be outside of the addressable range on 32-bits. e820_update_range_map() should not blindly update e820, but should do all it work on the map it got a pointer passed for (which in 50% of the cases is &e820_saved). It must also not call e820_add_region(), as that again acts on e820 unconditionally. The issues were found when trying to make this option work in our Xen kernel (i.e. where some of the silent assumptions made in the code would not hold). Signed-off-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <49B9171B.76E4.0078.0@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/check.c')
-rw-r--r--arch/x86/kernel/check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index 2ac0ab71412..b617b1164f1 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -83,7 +83,7 @@ void __init setup_bios_corruption_check(void)
u64 size;
addr = find_e820_area_size(addr, &size, PAGE_SIZE);
- if (addr == 0)
+ if (!(addr + 1))
break;
if ((addr + size) > corruption_check_size)