]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i915 fix for next-20210902
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 2 Sep 2021 17:43:56 +0000 (13:43 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 2 Sep 2021 17:43:56 +0000 (13:43 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
drivers/gpu/drm/i915/gem/i915_gem_userptr.c

index 8ea0fa665e5305788a078765874d1488246996c4..a67d62159e5b855753f408a5d83c5ab65da0272f 100644 (file)
@@ -423,11 +423,12 @@ static int
 probe_range(struct mm_struct *mm, unsigned long addr, unsigned long len)
 {
        const unsigned long end = addr + len;
+       MA_STATE(mas, &mm->mm_mt, addr, addr);
        struct vm_area_struct *vma;
        int ret = -EFAULT;
 
        mmap_read_lock(mm);
-       for (vma = find_vma(mm, addr); vma; vma = vma->vm_next) {
+       mas_for_each(&mas, vma, ULONG_MAX) {
                /* Check for holes, note that we also update the addr below */
                if (vma->vm_start > addr)
                        break;