Commit 266530b3 authored by Jeffy Chen's avatar Jeffy Chen Committed by Linus Torvalds

drm: Add missing field copy in compat_drm_version

DRM_IOCTL_VERSION is supposed to update the name_len/date_len/desc_len
fields to user.

Fixes: 012c6741 ("switch compat_drm_version() to drm_ioctl_kernel()")
Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4ca6df13
...@@ -112,6 +112,9 @@ static int compat_drm_version(struct file *file, unsigned int cmd, ...@@ -112,6 +112,9 @@ static int compat_drm_version(struct file *file, unsigned int cmd,
v32.version_major = v.version_major; v32.version_major = v.version_major;
v32.version_minor = v.version_minor; v32.version_minor = v.version_minor;
v32.version_patchlevel = v.version_patchlevel; v32.version_patchlevel = v.version_patchlevel;
v32.name_len = v.name_len;
v32.date_len = v.date_len;
v32.desc_len = v.desc_len;
if (copy_to_user((void __user *)arg, &v32, sizeof(v32))) if (copy_to_user((void __user *)arg, &v32, sizeof(v32)))
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