4.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Minfei Huang <mnfhu...@gmail.com>

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 <mnfhu...@gmail.com>
Cc: tony.l...@intel.com
Cc: wangn...@huawei.com
Cc: david.vra...@citrix.com
Reviewed-by: ying...@kernel.org
Link: 
http://lkml.kernel.org/r/1436703522-29552-1-git-send-email-mhu...@redhat.com
Signed-off-by: Thomas Gleixner <t...@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 arch/x86/mm/init_32.c |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -137,6 +137,7 @@ page_table_range_init_count(unsigned lon
 
        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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to