From: Liam R. Howlett Date: Wed, 17 Feb 2021 22:15:37 +0000 (-0500) Subject: mm/mprotect: Use vma_next() instead of mas_next(). X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bdff47e3b07f206a03911aba5d6990543ba2f1c3;p=users%2Fjedix%2Flinux-maple.git mm/mprotect: Use vma_next() instead of mas_next(). mas is in the wrong state and would potentially return the current vma twice. Signed-off-by: Liam R. Howlett --- diff --git a/mm/mprotect.c b/mm/mprotect.c index 676224803726f..6dbd5f685ffb0 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -634,7 +634,7 @@ static int do_mprotect_pkey(unsigned long start, size_t len, if (nstart >= end) goto out; - vma = mas_next(&mas, ULONG_MAX); + vma = vma_next(current->mm, vma); if (!vma || vma->vm_start != nstart) { error = -ENOMEM; goto out;