Re: [PATCH 1/4] mm/gup_benchmark: Take the mmap lock around GUP

From: Michel Lespinasse
Date: Wed Sep 30 2020 - 19:22:29 EST


On Tue, Sep 29, 2020 at 6:20 PM Jann Horn <jannh@xxxxxxxxxx> wrote:
> To be safe against concurrent changes to the VMA tree, we must take the
> mmap lock around GUP operations (excluding the GUP-fast family of
> operations, which will take the mmap lock by themselves if necessary).
>
> This code is only for testing, and it's only reachable by root through
> debugfs, so this doesn't really have any impact; however, if we want to add
> lockdep asserts into the GUP path, we need to have clean locking here.
>
> Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>

Acked-by: Michel Lespinasse <walken@xxxxxxxxxx>

Thanks for these cleanups :)

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.