Re: [PATCH v4 23/23] mm/gup: remove support for gup(FOLL_LONGTERM)

2019-11-13 Thread John Hubbard
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) { /*

Re: [PATCH v4 23/23] mm/gup: remove support for gup(FOLL_LONGTERM)

2019-11-13 Thread Ira Weiny
On Tue, Nov 12, 2019 at 08:27:10PM -0800, John Hubbard wrote: > Now that all other kernel callers of get_user_pages(FOLL_LONGTERM) > have been converted to pin_longterm_pages(), lock it down: > > 1) Add an assertion to get_user_pages(), preventing callers from >passing FOLL_LONGTERM (in additi

[PATCH v4 23/23] mm/gup: remove support for gup(FOLL_LONGTERM)

2019-11-12 Thread John Hubbard
Now that all other kernel callers of get_user_pages(FOLL_LONGTERM) have been converted to pin_longterm_pages(), lock it down: 1) Add an assertion to get_user_pages(), preventing callers from passing FOLL_LONGTERM (in addition to the existing assertion that prevents FOLL_PIN). 2) Remove the