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: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Hugh Dickins and committed by Thomas Gleixner 2884f110 226e9a93

+1 -1
+1 -1
arch/x86/mm/init_64.c
··· 206 pmd_t *last_pmd = pmd + PTRS_PER_PMD; 207 208 for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { 209 - if (!pmd_present(*pmd)) 210 continue; 211 if (vaddr < (unsigned long) _text || vaddr > end) 212 set_pmd(pmd, __pmd(0));
··· 206 pmd_t *last_pmd = pmd + PTRS_PER_PMD; 207 208 for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { 209 + if (pmd_none(*pmd)) 210 continue; 211 if (vaddr < (unsigned long) _text || vaddr > end) 212 set_pmd(pmd, __pmd(0));