From: John Hubbard Subject: Re: [PATCH v4 23/23] mm/gup: remove support for gup(FOLL_LONGTERM) Date: Wed, 13 Nov 2019 15:27:00 -0800 Message-ID: <4e24c5af-bd96-e7c7-179b-0ca0f6abb852@nvidia.com> References: <20191113042710.3997854-1-jhubbard@nvidia.com> <20191113042710.3997854-24-jhubbard@nvidia.com> <20191113190935.GD12947@iweiny-DESK2.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191113190935.GD12947@iweiny-DESK2.sc.intel.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org To: Ira Weiny Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman List-Id: dri-devel@lists.freedesktop.org On 11/13/19 11:09 AM, Ira Weiny wrote: ... >> diff --git a/mm/gup.c b/mm/gup.c >> index 82e7e4ce5027..90f5f95ee7ac 100644 >> --- a/mm/gup.c >> +++ b/mm/gup.c >> @@ -1756,11 +1756,11 @@ long get_user_pages(unsigned long start, unsigned long nr_pages, >> struct vm_area_struct **vmas) >> { >> /* >> - * FOLL_PIN must only be set internally by the pin_user_page*() and >> - * pin_longterm_*() APIs, never directly by the caller, so enforce that >> - * with an assertion: >> + * FOLL_PIN and FOLL_LONGTERM must only be set internally by the >> + * pin_user_page*() and pin_longterm_*() APIs, never directly by the >> + * caller, so enforce that with an assertion: >> */ >> - if (WARN_ON_ONCE(gup_flags & FOLL_PIN)) >> + if (WARN_ON_ONCE(gup_flags & (FOLL_PIN | FOLL_LONGTERM))) > > Don't we want to block FOLL_LONGTERM in get_user_pages_fast() as well after all > this? > Yes. But with the latest idea to restore FOLL_LONGTERM to its original glory, that won't be an issue in the next version. heh. thanks, -- John Hubbard NVIDIA