]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
linux-next-pre
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 2 Jun 2021 03:53:17 +0000 (13:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 2 Jun 2021 03:53:17 +0000 (13:53 +1000)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 61c4fb1b87fea7992c45a8c5c91134ade2d626d4..d5cbc51c5eaa8313fb1b9da91e37966351e3ca52 100644 (file)
@@ -709,8 +709,8 @@ int amdgpu_ttm_tt_get_user_pages(struct amdgpu_bo *bo, struct page **pages)
        }
 
        mmap_read_lock(mm);
-       vma = vma_lookup(mm, start);
-       if (unlikely(!vma)) {
+       vma = find_vma(mm, start);
+       if (unlikely(!vma || start < vma->vm_start)) {
                r = -EFAULT;
                goto out_unlock;
        }