Re: [PATCH v3] mm/hugetlb: fix a addressing exception caused by huge_pte_offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020/3/27 20:11, Jason Gunthorpe wrote:
> 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?
> 
Sorry, it's a typo, I'll send v4

> Jason
> .
> 

---
Regards,
Longpeng(Mike)



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux