[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200930123217.GD9916@ziepe.ca>
Date: Wed, 30 Sep 2020 09:32:17 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Jann Horn <jannh@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Michel Lespinasse <walken@...gle.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH 4/4] mm/gup: Assert that the mmap lock is held in
__get_user_pages()
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 globally visible), add an assertion to make sure it stays that way
> going forward.
>
> [1] https://lore.kernel.org/lkml/CAG48ez3tZAb9JVhw4T5e-i=h2_DUZxfNRTDsagSRCVazNXx5qA@mail.gmail.com/
>
> Signed-off-by: Jann Horn <jannh@...gle.com>
> ---
> mm/gup.c | 2 ++
> 1 file changed, 2 insertions(+)
I'm happy to see this, I have observed many cases of missing locking
here.
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
Thanks,
Jason
Powered by blists - more mailing lists