From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751460AbdFFRfT (ORCPT ); Tue, 6 Jun 2017 13:35:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbdFFRfR (ORCPT ); Tue, 6 Jun 2017 13:35:17 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4139E61D10 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jglisse@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4139E61D10 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Andy Lutomirski , Ingo Molnar , "Kirill A . Shutemov" , Logan Gunthorpe Subject: [PATCH] x86/mm/hotplug: fix BUG_ON() after hotremove Date: Tue, 6 Jun 2017 13:35:12 -0400 Message-Id: <20170606173512.7378-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 06 Jun 2017 17:35:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With commit af2cf278ef4f we no longer free pud so that we do not have synchronize all pgd on hotremove/vfree. But the new 5 level page table code re-added that code f2a6a705 and thus we now trigger a BUG_ON() l128 in sync_global_pgds() This patch remove free_pud() like in af2cf278ef4f Signed-off-by: Jérôme Glisse Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Logan Gunthorpe --- arch/x86/mm/init_64.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index a8a9972..8cf7e99 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -772,24 +772,6 @@ static void __meminit free_pmd_table(pmd_t *pmd_start, pud_t *pud) spin_unlock(&init_mm.page_table_lock); } -static void __meminit free_pud_table(pud_t *pud_start, p4d_t *p4d) -{ - pud_t *pud; - int i; - - for (i = 0; i < PTRS_PER_PUD; i++) { - pud = pud_start + i; - if (!pud_none(*pud)) - return; - } - - /* free a pud talbe */ - free_pagetable(p4d_page(*p4d), 0); - spin_lock(&init_mm.page_table_lock); - p4d_clear(p4d); - spin_unlock(&init_mm.page_table_lock); -} - static void __meminit remove_pte_table(pte_t *pte_start, unsigned long addr, unsigned long end, bool direct) @@ -991,7 +973,6 @@ remove_p4d_table(p4d_t *p4d_start, unsigned long addr, unsigned long end, pud_base = pud_offset(p4d, 0); remove_pud_table(pud_base, addr, next, direct); - free_pud_table(pud_base, p4d); } if (direct) -- 2.9.3