diff options
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r-- | arch/x86/kernel/e820.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 2e08619a9c5..9836a079cfd 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -1066,6 +1066,9 @@ unsigned long __init e820_end(void) struct e820entry *ei = &e820.map[i]; unsigned long end_pfn; + if (ei->type != E820_RAM) + continue; + end_pfn = (ei->addr + ei->size) >> PAGE_SHIFT; if (end_pfn > last_pfn) last_pfn = end_pfn; @@ -1193,6 +1196,9 @@ static int __init parse_memmap_opt(char *p) char *oldp; u64 start_at, mem_size; + if (!p) + return -EINVAL; + if (!strcmp(p, "exactmap")) { #ifdef CONFIG_CRASH_DUMP /* |