summaryrefslogtreecommitdiff
path: root/mm/vma_exec.c
diff options
context:
space:
mode:
authorLorenzo Stoakes <ljs@kernel.org>2026-07-11 19:45:05 +0100
committerAndrew Morton <akpm@linux-foundation.org>2026-08-06 18:57:03 -0700
commita2fdfd0080a3b15afa81f8495f8b82eb167441a5 (patch)
tree59b727fa9bf9e4828ade655edcde2e943df7d636 /mm/vma_exec.c
parente28266b033c30aa0f6c888bea6f1d25f7854185d (diff)
downloadlinux-next-a2fdfd0080a3b15afa81f8495f8b82eb167441a5.tar.gz
linux-next-a2fdfd0080a3b15afa81f8495f8b82eb167441a5.zip
mm: introduce vma_get_page_prot() and use it
There's a large number of vm_get_page_prot(vma->vm_flags) invocations. Make life easier by introducing vma_get_page_prot() parameterised by the VMA. This also makes converting vm_get_page_prot() to vma_flags_t easier. Also update the userland VMA tests to reflect the change. No functional change intended. Link: https://lore.kernel.org/20260711-b4-vma-flags-mm-v2-8-0fa2357d5431@kernel.org Signed-off-by: Lorenzo Stoakes <ljs@kernel.org> Acked-by: Zi Yan <ziy@nvidia.com> Acked-by: Jani Nikula <jani.nikula@intel.com> # for i915 Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> [DRM] Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Barry Song <baohua@kernel.org> Cc: Christian Brauner <brauner@kernel.org> Cc: Dave Airlie <airlied@gmail.com> Cc: David Hildenbrand <david@kernel.org> Cc: Dev Jain <dev.jain@arm.com> Cc: Jan Kara <jack@suse.cz> Cc: Jann Horn <jannh@google.com> Cc: Lance Yang <lance.yang@linux.dev> Cc: Mike Rapoport <rppt@kernel.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Nico Pache <npache@redhat.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Pedro Falcato <pfalcato@suse.de> Cc: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/vma_exec.c')
-rw-r--r--mm/vma_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vma_exec.c b/mm/vma_exec.c
index ef1fa2b161f3..a3c6b05c65fe 100644
--- a/mm/vma_exec.c
+++ b/mm/vma_exec.c
@@ -146,7 +146,7 @@ int create_init_stack_vma(struct mm_struct *mm, struct vm_area_struct **vmap,
if (pgtable_supports_soft_dirty())
flags |= VM_SOFTDIRTY;
vm_flags_init(vma, flags);
- vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
+ vma->vm_page_prot = vma_get_page_prot(vma);
err = insert_vm_struct(mm, vma);
if (err)