diff options
author | Minfei Huang <mnfhuang@gmail.com> | 2015-07-12 20:18:42 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-10-07 10:15:48 -0400 |
commit | 946f8cba3e55fb62ab463b9ab381399857b61c36 (patch) | |
tree | 8b22873bb17e416d5d2f08a8f8c017e3d7442db3 /arch | |
parent | 2f4bef0fa3324781de28f3621bb203271709927a (diff) | |
download | lwn-946f8cba3e55fb62ab463b9ab381399857b61c36.tar.gz lwn-946f8cba3e55fb62ab463b9ab381399857b61c36.zip |
x86/mm: Initialize pmd_idx in page_table_range_init_count()
[ Upstream commit 9962eea9e55f797f05f20ba6448929cab2a9f018 ]
The variable pmd_idx is not initialized for the first iteration of the
for loop.
Assign the proper value which indexes the start address.
Fixes: 719272c45b82 'x86, mm: only call early_ioremap_page_table_range_init() once'
Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
Cc: tony.luck@intel.com
Cc: wangnan0@huawei.com
Cc: david.vrabel@citrix.com
Reviewed-by: yinghai@kernel.org
Link: http://lkml.kernel.org/r/1436703522-29552-1-git-send-email-mhuang@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/init_32.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index c8140e12816a..c23ab1ee3a9a 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -137,6 +137,7 @@ page_table_range_init_count(unsigned long start, unsigned long end) vaddr = start; pgd_idx = pgd_index(vaddr); + pmd_idx = pmd_index(vaddr); for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd_idx++) { for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end); |