Using vma_lookup() enables for simplified checking of the returned vma
to ensure the end address also falls within the same vma. The start
address must be in the returned vma from vma_lookup().
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
* to this process.
*/
mmap_read_lock(current->mm);
- vma = find_vma(current->mm, addr);
- if (!vma || addr < vma->vm_start || addr + len > vma->vm_end)
+ vma = vma_lookup(current->mm, addr);
+ if (!vma || addr + len > vma->vm_end)
goto out_unlock;
}