aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/mmap.c2
-rw-r--r--mm/nommu.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 6466699b16cb..0db0de1c2fbe 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1940,7 +1940,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
1940 1940
1941 /* Check the cache first. */ 1941 /* Check the cache first. */
1942 /* (Cache hit rate is typically around 35%.) */ 1942 /* (Cache hit rate is typically around 35%.) */
1943 vma = mm->mmap_cache; 1943 vma = ACCESS_ONCE(mm->mmap_cache);
1944 if (!(vma && vma->vm_end > addr && vma->vm_start <= addr)) { 1944 if (!(vma && vma->vm_end > addr && vma->vm_start <= addr)) {
1945 struct rb_node *rb_node; 1945 struct rb_node *rb_node;
1946 1946
diff --git a/mm/nommu.c b/mm/nommu.c
index e19328087534..2f3ea749c318 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -821,7 +821,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
821 struct vm_area_struct *vma; 821 struct vm_area_struct *vma;
822 822
823 /* check the cache first */ 823 /* check the cache first */
824 vma = mm->mmap_cache; 824 vma = ACCESS_ONCE(mm->mmap_cache);
825 if (vma && vma->vm_start <= addr && vma->vm_end > addr) 825 if (vma && vma->vm_start <= addr && vma->vm_end > addr)
826 return vma; 826 return vma;
827 827