Re: [PATCH 4/4] mm/gup: Assert that the mmap lock is held in __get_user_pages()

2020-09-30 Thread Michel Lespinasse
On Wed, Sep 30, 2020 at 5:32 AM Jason Gunthorpe wrote: > On Tue, Sep 29, 2020 at 06:20:01PM -0700, Jann Horn wrote: > > After having cleaned up all GUP callers (except for the atomisp staging > > driver, which currently gets mmap locking completely wrong [1]) to always > > ensure that they hold th

Re: [PATCH 4/4] mm/gup: Assert that the mmap lock is held in __get_user_pages()

2020-09-30 Thread Jason Gunthorpe
On Tue, Sep 29, 2020 at 06:20:01PM -0700, Jann Horn wrote: > After having cleaned up all GUP callers (except for the atomisp staging > driver, which currently gets mmap locking completely wrong [1]) to always > ensure that they hold the mmap lock when calling into GUP (unless the mm is > not yet gl

[PATCH 4/4] mm/gup: Assert that the mmap lock is held in __get_user_pages()

2020-09-29 Thread Jann Horn
After having cleaned up all GUP callers (except for the atomisp staging driver, which currently gets mmap locking completely wrong [1]) to always ensure that they hold the mmap lock when calling into GUP (unless the mm is not yet globally visible), add an assertion to make sure it stays that way go