Commit dda33009 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Remove user controllable DRM_ERROR for i915_getparam()

The GETPARAM ioctl writes to a user supplied address. If that address is
invalid, it is the user's error and not the driver's, so quietly report
EFAULT and don't blame ourselves with a DRM_ERROR.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466773227-7994-11-git-send-email-chris@chris-wilson.co.uk
parent 0673ad47
...@@ -752,10 +752,8 @@ static int i915_getparam(struct drm_device *dev, void *data, ...@@ -752,10 +752,8 @@ static int i915_getparam(struct drm_device *dev, void *data,
return -EINVAL; return -EINVAL;
} }
if (copy_to_user(param->value, &value, sizeof(int))) { if (put_user(value, param->value))
DRM_ERROR("copy_to_user failed\n");
return -EFAULT; return -EFAULT;
}
return 0; return 0;
} }
......
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