lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] mm: protect free_pgtables with mmap_lock write lock in exit_mmap
On Mon 06-12-21 18:52:28, Matthew Wilcox wrote:
> On Mon, Dec 06, 2021 at 10:35:03AM -0800, Suren Baghdasaryan wrote:
> > > Other than that looks OK to me. Maybe we want to add an explicit note
> > > that vm_ops::close cannot take mmap_sem in any form. The changelog
> > > should also mention that you have considered remove_vma and its previous
> > > no MM locking assumption. You can argue that fput is async and close
> > > callback shouldn't really need mmap_sem.
> >
> > Should I post another version of this patch with the patch description
> > clarifying these points and additional comments as you suggested?
>
> fyi, vm_ops->close() is already called with the mmap_sem held for write
> in __split_vma(). If that needs to be documented, it's a separate patch
> because it's absolutely not a consequence of this patch.

Agreed! We definitely want to document that.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2021-12-07 11:05    [W:0.063 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site