Commit 42c5814c authored by Guenter Roeck's avatar Guenter Roeck Committed by Daniel Vetter

next: drm/atomic: Use copy_from_user to copy 64 bit data from user space

Copying 64 bit data from user space using get_user is not supported
on all architectures, and may result in the following build error.

ERROR: "__get_user_bad" [drivers/gpu/drm/drm.ko] undefined!

Avoid the problem by using copy_from_user.

Fixes: d34f20d6 ("drm: Atomic modeset ioctl")
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent cdd1cf79
......@@ -1259,7 +1259,9 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
goto fail;
}
if (get_user(prop_value, prop_values_ptr + copied_props)) {
if (copy_from_user(&prop_value,
prop_values_ptr + copied_props,
sizeof(prop_value))) {
ret = -EFAULT;
goto fail;
}
......
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