The patch titled Subject: mm/mprotect: fix maple tree start address in do_mprotect_pkey() has been added to the -mm mm-unstable branch. Its filename is mm-mprotect-use-maple-tree-navigation-instead-of-vma-linked-list-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mprotect-use-maple-tree-navigation-instead-of-vma-linked-list-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Liam Howlett <liam.howlett@xxxxxxxxxx> Subject: mm/mprotect: fix maple tree start address in do_mprotect_pkey() Date: Thu, 25 Aug 2022 20:30:24 +0000 Use the untagged_addr() instead of the address passed into the function. Link: https://lkml.kernel.org/r/20220825202939.3041660-1-Liam.Howlett@xxxxxxxxxx Fixes: 3338b715d25d ("mm/mprotect: use maple tree navigation instead of vma linked list") Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mprotect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/mprotect.c~mm-mprotect-use-maple-tree-navigation-instead-of-vma-linked-list-fix +++ a/mm/mprotect.c @@ -676,7 +676,7 @@ static int do_mprotect_pkey(unsigned lon const bool rier = (current->personality & READ_IMPLIES_EXEC) && (prot & PROT_READ); struct mmu_gather tlb; - MA_STATE(mas, ¤t->mm->mm_mt, start, start); + MA_STATE(mas, ¤t->mm->mm_mt, 0, 0); start = untagged_addr(start); @@ -708,6 +708,7 @@ static int do_mprotect_pkey(unsigned lon if ((pkey != -1) && !mm_pkey_is_allocated(current->mm, pkey)) goto out; + mas_set(&mas, start); vma = mas_find(&mas, ULONG_MAX); error = -ENOMEM; if (!vma) _ Patches currently in -mm which might be from liam.howlett@xxxxxxxxxx are binder_alloc-add-missing-mmap_lock-calls-when-using-the-vma.patch maple-tree-add-new-data-structure-fix.patch mm-mprotect-use-maple-tree-navigation-instead-of-vma-linked-list-fix.patch mm-vmscan-use-vma-iterator-instead-of-vm_next.patch