lkml.org 
[lkml]   [2023]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm/hugetlb.c: fix a bug within a BUG(): inconsistent pte comparison
From
On 6/30/23 03:07, Ryan Roberts wrote:
...
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index bce28cca73a1..73fbeb8f979f 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>> @@ -7246,7 +7246,12 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
>> pte = (pte_t *)pmd_alloc(mm, pud, addr);
>> }
>> }
>> - BUG_ON(pte && pte_present(ptep_get(pte)) && !pte_huge(ptep_get(pte)));
>> +
>> + if (pte) {
>> + pte_t pteval = ptep_get(pte);
>
> Given the PTL is not held here, I think this should technically be
> ptep_get_lockless()?
>

Oh yes. I'll change it to that and send a v2, thanks!


thanks,
--
John Hubbard
NVIDIA

\
 
 \ /
  Last update: 2023-07-01 02:23    [W:1.328 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site