Thread (92 messages) 92 messages, 3 authors, 1h ago

Re: [PATCH v4 07/38] mm: add mmap action for discontiguous kernel page mapping

flat view

From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Date: 2026-10-09 16:56:31
Also in: bpf, fuse-devel, kvm, kvm-riscv, kvmarm, linux-arch, linux-doc, linux-fbdev, linux-fsdevel, linux-mm, linux-perf-users, linux-rdma, linux-s390, linux-scsi, linux-sound, linux-usb, linuxppc-dev, lkml, selinux, sparclinux

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) [off-list ref] wrote:
quoted
diff --git a/mm/memory.c b/mm/memory.c
index 448342883e9d..45b21bb04a18 100644
--- a/mm/memory.c
+++ b/mm/memory.c
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help