aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 8ff6b581cf1c..fee66ccebed6 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1447,7 +1447,7 @@ static int eb_relocate_vma(struct i915_execbuffer *eb, struct i915_vma *vma)
1447 * to read. However, if the array is not writable the user loses 1447 * to read. However, if the array is not writable the user loses
1448 * the updated relocation values. 1448 * the updated relocation values.
1449 */ 1449 */
1450 if (unlikely(!access_ok(VERIFY_READ, urelocs, remain*sizeof(*urelocs)))) 1450 if (unlikely(!access_ok(urelocs, remain*sizeof(*urelocs))))
1451 return -EFAULT; 1451 return -EFAULT;
1452 1452
1453 do { 1453 do {
@@ -1554,7 +1554,7 @@ static int check_relocations(const struct drm_i915_gem_exec_object2 *entry)
1554 1554
1555 addr = u64_to_user_ptr(entry->relocs_ptr); 1555 addr = u64_to_user_ptr(entry->relocs_ptr);
1556 size *= sizeof(struct drm_i915_gem_relocation_entry); 1556 size *= sizeof(struct drm_i915_gem_relocation_entry);
1557 if (!access_ok(VERIFY_READ, addr, size)) 1557 if (!access_ok(addr, size))
1558 return -EFAULT; 1558 return -EFAULT;
1559 1559
1560 end = addr + size; 1560 end = addr + size;
@@ -2090,7 +2090,7 @@ get_fence_array(struct drm_i915_gem_execbuffer2 *args,
2090 return ERR_PTR(-EINVAL); 2090 return ERR_PTR(-EINVAL);
2091 2091
2092 user = u64_to_user_ptr(args->cliprects_ptr); 2092 user = u64_to_user_ptr(args->cliprects_ptr);
2093 if (!access_ok(VERIFY_READ, user, nfences * sizeof(*user))) 2093 if (!access_ok(user, nfences * sizeof(*user)))
2094 return ERR_PTR(-EFAULT); 2094 return ERR_PTR(-EFAULT);
2095 2095
2096 fences = kvmalloc_array(nfences, sizeof(*fences), 2096 fences = kvmalloc_array(nfences, sizeof(*fences),