diff options
author | Suren Baghdasaryan <surenb@google.com> | 2023-08-04 18:27:24 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-21 23:37:46 +0300 |
commit | c9d6e982c3f8703c24f488d3de15e0ee97f4655e (patch) | |
tree | bbc0499be0e5660132dd59ab08b360960db24691 /mm/init-mm.c | |
parent | ad9f006351c3368171458ae7ab14d72f031b239f (diff) | |
download | linux-c9d6e982c3f8703c24f488d3de15e0ee97f4655e.tar.xz |
mm: move vma locking out of vma_prepare and dup_anon_vma
vma_prepare() is currently the central place where vmas are being locked
before vma_complete() applies changes to them. While this is convenient,
it also obscures vma locking and makes it harder to follow the locking
rules. Move vma locking out of vma_prepare() and take vma locks
explicitly at the locations where vmas are being modified. Move vma
locking and replace it with an assertion inside dup_anon_vma() to further
clarify the locking pattern inside vma_merge().
Link: https://lkml.kernel.org/r/20230804152724.3090321-7-surenb@google.com
Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Suggested-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/init-mm.c')
0 files changed, 0 insertions, 0 deletions