From 30c426867d882a71dda794720f92495b2359072b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Feb 2013 13:14:17 +1100 Subject: [PATCH] memory-hotplug-common-apis-to-support-page-tables-hot-remove-fix-fix-fix-fix-fix-fix-fix fix used-uninitialised bug Cc: Jiang Liu Cc: Jianguo Wu Cc: Kamezawa Hiroyuki Cc: Lai Jiangshan Cc: Tang Chen Cc: Wen Congyang Cc: Yasuaki Ishimatsu Cc: Yinghai Lu Signed-off-by: Andrew Morton --- arch/x86/mm/init_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 6bcca6563c28..ca6cd403a275 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -993,12 +993,12 @@ remove_pagetable(unsigned long start, unsigned long end, bool direct) 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)) -- 2.39.5