aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinfei Huang <mnfhuang@gmail.com>2015-07-12 20:18:42 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-01 12:07:31 +0200
commit55b9029eab6e1cf44afa35b9823308246a0605d9 (patch)
tree5d2053b6d2950f126b824863776fe75241fd6d86
parent1d6c45737c391f980df36e9183f81f8b19632d37 (diff)
downloadlinux-linaro-stable-55b9029eab6e1cf44afa35b9823308246a0605d9.tar.gz
x86/mm: Initialize pmd_idx in page_table_range_init_count()
commit 9962eea9e55f797f05f20ba6448929cab2a9f018 upstream. 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/x86/mm/init_32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 3ac7e319918d..6a70f0ee4092 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);