File get_user_pages_remote-hack.diff of Package drm

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |    3 ++-
 drivers/gpu/drm/i915/i915_gem_userptr.c |    3 +++
 drivers/gpu/drm/radeon/radeon_ttm.c     |    3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
@@ -481,6 +481,9 @@ __i915_gem_userptr_set_active(struct drm
 	return ret;
 }
 
+#define get_user_pages_remote(a, b, c, d, e, f, g, h)	\
+	get_user_pages(a, b, c, d, e, f, g, h)
+
 static void
 __i915_gem_userptr_get_pages_worker(struct work_struct *_work)
 {
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -562,7 +562,8 @@ static int radeon_ttm_tt_pin_userptr(str
 		uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
 		struct page **pages = ttm->pages + pinned;
 
-		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
+		r = get_user_pages(current, current->mm, userptr, num_pages,
+				   write, 0, pages, NULL);
 		if (r < 0)
 			goto release_pages;
 
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -548,7 +548,8 @@ int amdgpu_ttm_tt_get_user_pages(struct
 		list_add(&guptask.list, &gtt->guptasks);
 		spin_unlock(&gtt->guptasklock);
 
-		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
+		r = get_user_pages(current, current->mm, userptr, num_pages,
+				   write, 0, p, NULL);
 
 		spin_lock(&gtt->guptasklock);
 		list_del(&guptask.list);