Use mas_find() in do_mprotect_pkey to find the next vma to better align
with what happened with the old API
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
if ((pkey != -1) && !mm_pkey_is_allocated(current->mm, pkey))
goto out;
- mas_set(&mas, start);
- vma = mas_walk(&mas);
+ vma = mas_find(&mas, -1);
error = -ENOMEM;
if (!vma)
goto out;
if (nstart >= end)
goto out;
- vma = mas_next(&mas, ULONG_MAX);
+ vma = mas_next(&mas, -1);
if (!vma || vma->vm_start != nstart) {
error = -ENOMEM;
goto out;