Re: [PATCH v2] mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked()
From: David Hildenbrand (Arm)
Date: Sun May 31 2026 - 13:23:38 EST
On 5/27/26 02:35, Andrew Morton wrote:
> On Fri, 24 Apr 2026 16:19:32 +0200 "David Hildenbrand (Arm)" <david@xxxxxxxxxx> wrote:
>
>> On 4/24/26 15:38, Andrew Morton wrote:
>>>
>>>
>>> Battle of the bots?
>>> https://sashiko.dev/#/patchset/2026042303-vendor-outright-b9d2@gregkh
>>
>> It references the
>>
>> if (pages && !(flags & FOLL_PIN))
>> flags |= FOLL_GET;
>>
>> I'm not sure if there is actual NOMMU code that triggers it. For example,
>> uprobes uses that pattern, but I suspect that that's not a thing on NOMMU.
>>
>>
>> Probably best to just squash:
>>
>> diff --git a/mm/gup.c b/mm/gup.c
>> index ad9ded39609c..44bd28cf6e00 100644
>> --- a/mm/gup.c
>> +++ b/mm/gup.c
>> @@ -1988,6 +1988,9 @@ static long __get_user_pages_locked(struct mm_struct *mm,
>> unsigned long start,
>> if (!nr_pages)
>> return 0;
>>
>> + if (pages && !(foll_flags & FOLL_PIN))
>> + foll_flags |= FOLL_GET;
>> +
>> /*
>> * The internal caller expects GUP to manage the lock internally and the
>> * lock must be released when this returns.
>
> Nothing happened.
>
> Should we proceed with this as-is?
No let's squash what I provided. Probably a resend would be best. If greg is too
busy I can give it a try tomorrow.
--
Cheers,
David