Commit 2884f110 authored by Hugh Dickins's avatar Hugh Dickins Committed by Thomas Gleixner

x86: fix bad pmd ffff810000207xxx(9090909090909090)

OGAWA Hirofumi and Fede have reported rare pmd_ERROR messages:
mm/memory.c:127: bad pmd ffff810000207xxx(9090909090909090).

Initialization's cleanup_highmap was leaving alignment filler
behind in the pmd for MODULES_VADDR: when vmalloc's guard page
would occupy a new page table, it's not allocated, and then
module unload's vfree hits the bad 9090 pmd entry left over.
Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 226e9a93
...@@ -206,7 +206,7 @@ void __init cleanup_highmap(void) ...@@ -206,7 +206,7 @@ void __init cleanup_highmap(void)
pmd_t *last_pmd = pmd + PTRS_PER_PMD; pmd_t *last_pmd = pmd + PTRS_PER_PMD;
for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) {
if (!pmd_present(*pmd)) if (pmd_none(*pmd))
continue; continue;
if (vaddr < (unsigned long) _text || vaddr > end) if (vaddr < (unsigned long) _text || vaddr > end)
set_pmd(pmd, __pmd(0)); set_pmd(pmd, __pmd(0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment