提交 5871aa6d 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[PATCH] i386: Fix overflow in e820_all_mapped

The 32bit version of e820_all_mapped() needs to use u64 to avoid overflows on
PAE systems.  Pointed out by Jan Beulich
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 32828546
......@@ -970,8 +970,10 @@ efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
* not-overlapping, which is the case
*/
int __init
e820_all_mapped(unsigned long start, unsigned long end, unsigned type)
e820_all_mapped(unsigned long s, unsigned long e, unsigned type)
{
u64 start = s;
u64 end = e;
int i;
for (i = 0; i < e820.nr_map; i++) {
struct e820entry *ei = &e820.map[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册