From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933896AbcKDAQW (ORCPT ); Thu, 3 Nov 2016 20:16:22 -0400 Received: from foss.arm.com ([217.140.101.70]:49642 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933372AbcKDAQV (ORCPT ); Thu, 3 Nov 2016 20:16:21 -0400 Date: Thu, 3 Nov 2016 18:16:16 -0600 From: Catalin Marinas To: Huang Shijie Cc: dwoods@mellanox.com, steve.capper@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, kaly.xin@arm.com, akpm@linux-foundation.org, nd@arm.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] arm64: hugetlb: remove the wrong pmd check in find_num_contig() Message-ID: <20161104001616.ssjbemliorxi6evl@localhost> References: <1478140059-13829-1-git-send-email-shijie.huang@arm.com> <1478140059-13829-2-git-send-email-shijie.huang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478140059-13829-2-git-send-email-shijie.huang@arm.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 03, 2016 at 10:27:38AM +0800, Huang Shijie wrote: > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > index 2e49bd2..4811ef1 100644 > --- a/arch/arm64/mm/hugetlbpage.c > +++ b/arch/arm64/mm/hugetlbpage.c > @@ -61,10 +61,6 @@ static int find_num_contig(struct mm_struct *mm, unsigned long addr, > return 1; > } > pmd = pmd_offset(pud, addr); > - if (!pmd_present(*pmd)) { > - VM_BUG_ON(!pmd_present(*pmd)); > - return 1; > - } > if ((pte_t *)pmd == ptep) { > *pgsize = PMD_SIZE; > return CONT_PMDS; BTW, for the !pud_present() and !pgd_present() cases, shouldn't find_num_contig() actually return 0? These are more likely real bugs, so no point in setting the huge pte. -- Catalin