]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm: Add missing field copy in compat_drm_version
authorJeffy Chen <jeffy.chen@rock-chips.com>
Wed, 12 Jul 2017 06:18:32 +0000 (14:18 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jul 2017 18:25:04 +0000 (11:25 -0700)
DRM_IOCTL_VERSION is supposed to update the name_len/date_len/desc_len
fields to user.

Fixes: 012c6741c6aa ("switch compat_drm_version() to drm_ioctl_kernel()")
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/drm_ioc32.c

index 0b2d8c4a2fa528dafa96a22cd75768c643db205c..d1f2028520288261e4ad7c6344ea94e80178f3db 100644 (file)
@@ -112,6 +112,9 @@ static int compat_drm_version(struct file *file, unsigned int cmd,
        v32.version_major = v.version_major;
        v32.version_minor = v.version_minor;
        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)))
                return -EFAULT;
        return 0;