On Wed, 16 Oct 2024 15:05:28 -0700 John Hubbard <jhubbard@xxxxxxxxxx> wrote: > On 10/16/24 2:57 PM, Andrew Morton wrote: > > On Wed, 16 Oct 2024 13:22:42 -0700 John Hubbard <jhubbard@xxxxxxxxxx> wrote: > ... > >> Fix this by unpinning the pages that __get_user_pages_locked() has > >> pinned, in such error cases. > > > > Thanks. > > > >> Fixes: 24a95998e9ba ("mm/gup.c: simplify and fix check_and_migrate_movable_pages() return codes") > > > > I'll add this to the -stable backport pile, although this seems a bit > > marginal? > > I'm on the fence about that. It is marginal: you have to > exhaust memory. On the other hand, a real user reported > this bug to us. > > I guess I'd lean toward "correctness in -stable", and > add it to the pile, in the end. Thanks. It's a super-simple patch, which helps the decision.