VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Luigi Rizzo <lrizzo@google.com> 2021-09-02 14:56:46 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-03 09:58:13 -0700 commit: 5b78ed24e8ec48602c1d6f5a188e58d000c81e2b parent: e15710bf04063766f428048f4dad7b73b646203f
Commit Summary:
mm/pagemap: add mmap_assert_locked() annotations to find_vma*()
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index ca54d36d203a..79f4f8ae43ec 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -534,6 +534,7 @@ static int find_vma_links(struct mm_struct *mm, unsigned long addr,
 {
 	struct rb_node **__rb_link, *__rb_parent, *rb_prev;
 
+	mmap_assert_locked(mm);
 	__rb_link = &mm->mm_rb.rb_node;
 	rb_prev = __rb_parent = NULL;
 
@@ -2303,6 +2304,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 	struct rb_node *rb_node;
 	struct vm_area_struct *vma;
 
+	mmap_assert_locked(mm);
 	/* Check the cache first. */
 	vma = vmacache_find(mm, addr);
 	if (likely(vma))