On Sun, Oct 04, 2026 at 10:11:18AM -0700, Suren Baghdasaryan wrote:
> On Sat, Oct 3, 2026 at 6:35 PM Lorenzo Stoakes (ARM) <[email protected]> wrote:
> > diff --git a/mm/memory.c b/mm/memory.c
> > index 448342883e9d..45b21bb04a18 100644
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > +static void __map_kernel_pages_prepare(struct vm_area_desc *desc)
> > +{
> > + if (vma_desc_test(desc, VMA_MIXEDMAP_BIT))
> > + return;
> > +
> > + VM_WARN_ON_ONCE(mmap_read_trylock(desc->mm));
>
> Sorry I missed this before and it is pre-existing code but is this a
> weird way of asserting that mmap_lock is write-locked? If so, why not
> just use mmap_assert_write_locked()?
Ah yeah, this weirdness is duplicated from the existing code. Will fix up on
resin!
--
Cheers, Lorenzo