[PATCH v6 07/39] mm: assert mmap lock held, use new flags API in vm_insert_page[s]

Gregory Price (Meta) gourry at gourry.net
Tue Oct 20 14:48:32 PDT 2026


On 2026-10-13 16:04 +0100, Lorenzo Stoakes (ARM) wrote:
> The existing logic asserts that an mmap write lock is held, bizarrely, by
> asserting that an mmap_read_trylock() fails (which is not the same thing).
> 
> Assert the mmap write lock here and switch to using the new VMA flags API
> while here.
> 
> Note that the vma_start_write() is explicitly broken out from
> vm_flags_set() here in order to use vma_set_flags() safely.
> 
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>

Reviewed-by: Gregory Price (Meta) <gourry at gourry.net>

-- 
Gregory Price (Meta) <gourry at gourry.net>



More information about the kvm-riscv mailing list