Commit 389e0d3d authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Rodrigo Vivi

drm/i915: Annotate user relocs with __user

Add the missing __user to the urelocs cast to fix the following sparse
warning:
i915_gem_execbuffer.c:1541:47: warning: cast removes address space of expression
i915_gem_execbuffer.c:1541:62: warning: incorrect type in argument 2 (different address spaces)
i915_gem_execbuffer.c:1541:62:    expected void const [noderef] <asn:1>*from
i915_gem_execbuffer.c:1541:62:    got char *

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 2889caa9 ("drm/i915: Eliminate lots of iterations over the execobjects array")
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901165434.24636-1-ville.syrjala@linux.intel.com
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #irc
(cherry picked from commit 908a6105)
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 4bce4e98
...@@ -1529,7 +1529,7 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb) ...@@ -1529,7 +1529,7 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb)
min_t(u64, BIT_ULL(31), size - copied); min_t(u64, BIT_ULL(31), size - copied);
if (__copy_from_user((char *)relocs + copied, if (__copy_from_user((char *)relocs + copied,
(char *)urelocs + copied, (char __user *)urelocs + copied,
len)) { len)) {
kvfree(relocs); kvfree(relocs);
err = -EFAULT; err = -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment