From 3271e27bba90f676fa530592ba8ec9fe51938abf Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 18 Oct 2022 12:49:49 +0200 Subject: [PATCH] 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 Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger --- arch/um/kernel/tlb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index ad449173a1a1..fa43bcd9ba0b 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -597,6 +597,8 @@ void force_flush_all(void) struct vm_area_struct *vma; VMA_ITERATOR(vmi, mm, 0); + mmap_read_lock(mm); for_each_vma(vmi, vma) fix_range(mm, vma->vm_start, vma->vm_end, 1); + mmap_read_unlock(mm); }