2024-05-28 05:41:28

by Oscar Salvador

[permalink] [raw]
Subject: Re: [RFC PATCH v4 03/16] mm: Provide mm_struct and address to huge_ptep_get()

On Mon, May 27, 2024 at 03:30:01PM +0200, Christophe Leroy wrote:
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -547,7 +547,7 @@ static int gup_hugepte(struct vm_area_struct *vma, pte_t *ptep, unsigned long sz
> if (pte_end < end)
> end = pte_end;
>
> - pte = huge_ptep_get(ptep);
> + pte = huge_ptep_get(vma->mm, addr, ptep);

I looked again and I stumbled upon this.
It should have been "vma->vm_mm".



--
Oscar Salvador
SUSE Labs


2024-05-28 11:04:25

by Christophe Leroy

[permalink] [raw]
Subject: Re: [RFC PATCH v4 03/16] mm: Provide mm_struct and address to huge_ptep_get()



Le 28/05/2024 à 07:41, Oscar Salvador a écrit :
> On Mon, May 27, 2024 at 03:30:01PM +0200, Christophe Leroy wrote:
>> --- a/mm/gup.c
>> +++ b/mm/gup.c
>> @@ -547,7 +547,7 @@ static int gup_hugepte(struct vm_area_struct *vma, pte_t *ptep, unsigned long sz
>> if (pte_end < end)
>> end = pte_end;
>>
>> - pte = huge_ptep_get(ptep);
>> + pte = huge_ptep_get(vma->mm, addr, ptep);
>
> I looked again and I stumbled upon this.
> It should have been "vma->vm_mm".

Oops ... Thanks for seeing that. As it goes away at the end it went
unnoticed by builds.

Christophe