Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756030AbbGTVSx (ORCPT ); Mon, 20 Jul 2015 17:18:53 -0400 Received: from terminus.zytor.com ([198.137.202.10]:33685 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752000AbbGTVSw (ORCPT ); Mon, 20 Jul 2015 17:18:52 -0400 Date: Mon, 20 Jul 2015 14:18:35 -0700 From: tip-bot for Minfei Huang Message-ID: Cc: hpa@zytor.com, mnfhuang@gmail.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, mnfhuang@gmail.com, tglx@linutronix.de In-Reply-To: <1436703522-29552-1-git-send-email-mhuang@redhat.com> References: <1436703522-29552-1-git-send-email-mhuang@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/mm] x86/mm: Initialize pmd_idx in page_table_range_init_count() Git-Commit-ID: 9962eea9e55f797f05f20ba6448929cab2a9f018 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1639 Lines: 43 Commit-ID: 9962eea9e55f797f05f20ba6448929cab2a9f018 Gitweb: http://git.kernel.org/tip/9962eea9e55f797f05f20ba6448929cab2a9f018 Author: Minfei Huang AuthorDate: Sun, 12 Jul 2015 20:18:42 +0800 Committer: Thomas Gleixner CommitDate: Mon, 20 Jul 2015 23:14:47 +0200 x86/mm: Initialize pmd_idx in page_table_range_init_count() 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 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 --- arch/x86/mm/init_32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index c8140e1..c23ab1e 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/