Thread (33 messages) 33 messages, 7 authors, 2026-06-16

Re: [PATCH v2 1/5] mm: Make per-VMA locks available universally

From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Date: 2026-06-12 14:09:28
Also in: linux-mm, lkml

On 6/11/26 21:29, Suren Baghdasaryan wrote:
quoted
-
-/*
- * At least xtensa ends up having protection faults even with no
- * MMU.. No stack expansion, at least.
- */
-struct vm_area_struct *lock_mm_and_find_vma(struct mm_struct *mm,
-                       unsigned long addr, struct pt_regs *regs)
-{
-       struct vm_area_struct *vma;
-
-       mmap_read_lock(mm);
-       vma = vma_lookup(mm, addr);
-       if (!vma)
-               mmap_read_unlock(mm);
-       return vma;
-}
Might this removal break CONFIG_MMU=n && CONFIG_LOCK_MM_AND_FIND_VMA=n case?
Seems to me only the architectures that select CONFIG_LOCK_MM_AND_FIND_VMA
also call lock_mm_and_find_vma(). So it's probably fine?

I think this fallback was only for architectures that select
CONFIG_LOCK_MM_AND_FIND_VMA *and* have CONFIG_MMU=n (variant).
It just wasn't guarded by #ifdef CONFIG_LOCK_MM_AND_FIND_VMA as well.
quoted
-
-#endif /* CONFIG_MMU */
diff -puN mm/pagewalk.c~unconditional-vma-locks mm/pagewalk.c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help