[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200327121100.GR20941@ziepe.ca>
Date: Fri, 27 Mar 2020 09:11:00 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: "Longpeng(Mike)" <longpeng2@...wei.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kvm@...r.kernel.org, arei.gonglei@...wei.com,
weidong.huang@...wei.com, weifuqiang@...wei.com,
kirill.shutemov@...ux.intel.com,
Mike Kravetz <mike.kravetz@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Sean Christopherson <sean.j.christopherson@...el.com>,
stable@...r.kernel.org
Subject: Re: [PATCH v3] mm/hugetlb: fix a addressing exception caused by
huge_pte_offset
On Fri, Mar 27, 2020 at 09:40:07AM +0800, Longpeng(Mike) wrote:
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index dd8737a..d4fab68 100644
> +++ b/mm/hugetlb.c
> @@ -4909,29 +4909,33 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
> unsigned long addr, unsigned long sz)
> {
> pgd_t *pgd;
> - p4d_t *p4d;
> - pud_t *pud;
> - pmd_t *pmd;
> + p4d_t *p4g, p4d_entry;
> + pud_t *pud, pud_entry;
> + pmd_t *pmd, pmd_entry;
>
> pgd = pgd_offset(mm, addr);
> if (!pgd_present(*pgd))
> return NULL;
> - p4d = p4d_offset(pgd, addr);
> - if (!p4d_present(*p4d))
> +
> + p4g = p4d_offset(pgd, addr);
Why p4g here? Shouldn't it be p4d?
Jason
Powered by blists - more mailing lists