Skip to content

Commit 3271e27

Browse files
jmberg-intelrichardweinberger
authored andcommitted
um: protect VMA iteration
Due to changes in the iteration, there are now lockdep checks indicating that we're missing locking here. Add the missing locking where it's needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent e082036 commit 3271e27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/um/kernel/tlb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ void force_flush_all(void)
597597
struct vm_area_struct *vma;
598598
VMA_ITERATOR(vmi, mm, 0);
599599

600+
mmap_read_lock(mm);
600601
for_each_vma(vmi, vma)
601602
fix_range(mm, vma->vm_start, vma->vm_end, 1);
603+
mmap_read_unlock(mm);
602604
}

0 commit comments

Comments
 (0)