From: Guenter Roeck Date: Tue, 13 Jan 2015 05:12:17 +0000 (-0800) Subject: next: drm/atomic: Use copy_from_user to copy 64 bit data from user space X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=42c5814c9c9828a7fcbe25f69c5c8cbbf29ed957;p=openwrt%2Fstaging%2Fblogic.git 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: d34f20d6e2f2 ("drm: Atomic modeset ioctl") Cc: Rob Clark Signed-off-by: Guenter Roeck Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 1e38dfc8e462..af3f3dfdb49f 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1259,7 +1259,9 @@ retry: 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; }