]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memory-hotplug-common-apis-to-support-page-tables-hot-remove-fix-fix-fix-fix-fix...
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:14:17 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:31 +0000 (16:52 +1100)
fix used-uninitialised bug

Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/mm/init_64.c

index 6bcca6563c282e39e60b683b54345427fb222ff9..ca6cd403a275d2232c48de30177fefcf89e2f714 100644 (file)
@@ -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))