提交 42c5814c 编写于 作者: G Guenter Roeck 提交者: 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: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册