Re: [PATCH v2] mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked()

Andrew Morton
2026-04-24T11:39:53Z

On Fri, 24 Apr 2026 13:31:34 +0200 Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> > > @@ -2019,8 +2020,14 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start,
> > >
> > > if (pages) {
> > > pages[i] = virt_to_page((void *)start);
> > > - if (pages[i])
> > > - get_page(pages[i]);
> > > + if (!pages[i])
> > > + break;
> >
> > Best to mention that change in the patch description. I really think this is the
> > right thing to do (returning NULL in the page array is just very dubious).
>
> Ick, I see Andrew already grabbed this so I'll just leave it for now,
> thanks for the help and review!

Andrew does copy-n-paste ;)