summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/gup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/gup.c b/mm/gup.c
index 029de13c6718..bc3f56b7621e 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1360,6 +1360,8 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
must_unlock = true;
*locked = 1;
}
+ else
+ mmap_assert_locked(mm);
if (flags & FOLL_PIN)
mm_set_has_pinned_flag(&mm->flags);