[PATCH v6 07/39] mm: assert mmap lock held, use new flags API in vm_insert_page[s]
David Hildenbrand (Arm)
david at kernel.org
Tue Oct 13 08:20:57 PDT 2026
On 10/13/26 17:04, 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.
Which is a lot clearer.
Acked-by: David Hildenbrand (Arm) <david at kernel.org>
--
Cheers,
David
More information about the kvm-riscv
mailing list