Message ID | 20130204150417.2b1256b1.akpm@linux-foundation.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
--- a/arch/x86/mm/init_64.c~memory-hotplug-common-apis-to-support-page-tables-hot-remove-fix-fix-fix-fix-fix-fix-fix +++ a/arch/x86/mm/init_64.c @@ -993,12 +993,12 @@ remove_pagetable(unsigned long start, un bool pgd_changed = false; for (; start < end; start = next) { + next = pgd_addr_end(start, end); + pgd = pgd_offset_k(start); if (!pgd_present(*pgd)) continue; - next = pgd_addr_end(start, end); - pud = (pud_t *)pgd_page_vaddr(*pgd); remove_pud_table(pud, start, next, direct); if (free_pud_table(pud, pgd))