Commit ff82c54f authored by Lokesh Gidra's avatar Lokesh Gidra Committed by Omkar Sai Sandeep Katadi
Browse files

BACKPORT: mm: add vma_assert_locked() for !CONFIG_PER_VMA_LOCK

vma_assert_locked() is needed to replace mmap_assert_locked() once we
start using per-vma locks in userfaultfd operations.

In !CONFIG_PER_VMA_LOCK case when mm is locked, it implies that the given
VMA is locked.

Link: https://lkml.kernel.org/r/20240215182756.3448972-4-lokeshgidra@google.com


Signed-off-by: default avatarLokesh Gidra <lokeshgidra@google.com>
Reviewed-by: default avatarSuren Baghdasaryan <surenb@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jann Horn <jannh@google.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Nicolas Geoffray <ngeoffray@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Tim Murray <timmurray@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

(cherry picked from commit 32af81af)
Conflicts:
	include/linux/mm.h

1. lock_vma_under_rcu() definition in !CONFIG_PER_VMA_LOCK case doesn't
   exist in 6.1. Resolved cherry-pick conflict due to that.

Bug: 320478828
Bug: 339845931
Signed-off-by: default avatarLokesh Gidra <lokeshgidra@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:daf0b0fc4a07a13fd8016c09d8425e25a2f59027)
Merged-In: I76d414cd08c3d696d3886921a7e27cf94fd17b76
Change-Id: I76d414cd08c3d696d3886921a7e27cf94fd17b76
parent 698cedce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment