aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/traps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 57eb0f6f6005..467b69ed1021 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -418,12 +418,14 @@ static int bad_syscall(int n, struct pt_regs *regs)
418static inline void 418static inline void
419do_cache_op(unsigned long start, unsigned long end, int flags) 419do_cache_op(unsigned long start, unsigned long end, int flags)
420{ 420{
421 struct mm_struct *mm = current->active_mm;
421 struct vm_area_struct *vma; 422 struct vm_area_struct *vma;
422 423
423 if (end < start || flags) 424 if (end < start || flags)
424 return; 425 return;
425 426
426 vma = find_vma(current->active_mm, start); 427 down_read(&mm->mmap_sem);
428 vma = find_vma(mm, start);
427 if (vma && vma->vm_start < end) { 429 if (vma && vma->vm_start < end) {
428 if (start < vma->vm_start) 430 if (start < vma->vm_start)
429 start = vma->vm_start; 431 start = vma->vm_start;
@@ -432,6 +434,7 @@ do_cache_op(unsigned long start, unsigned long end, int flags)
432 434
433 flush_cache_user_range(vma, start, end); 435 flush_cache_user_range(vma, start, end);
434 } 436 }
437 up_read(&mm->mmap_sem);
435} 438}
436 439
437/* 440/*