From patchwork Wed Jul 12 06:18:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 9835929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 923DC602A0 for ; Wed, 12 Jul 2017 06:25:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77F65285C8 for ; Wed, 12 Jul 2017 06:25:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6ABA7285EC; Wed, 12 Jul 2017 06:25:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D92D8285C8 for ; Wed, 12 Jul 2017 06:25:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06DB66E350; Wed, 12 Jul 2017 06:25:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 403 seconds by postgrey-1.35 at gabe; Wed, 12 Jul 2017 06:25:41 UTC Received: from smtphy.263.net (syd-smtp01.263.net [54.79.106.188]) by gabe.freedesktop.org (Postfix) with ESMTPS id 251DD6E350 for ; Wed, 12 Jul 2017 06:25:41 +0000 (UTC) Received: from smtphy.263.net (sg-smtp01.263.net [54.255.195.220]) by smtphy.263.net (Postfix) with ESMTPS id BCC4840291 for ; Wed, 12 Jul 2017 14:18:57 +0800 (CST) Received: from transport.263xmail.com (unknown [38.83.106.156]) by smtphy.263.net (Postfix) with ESMTPS id 8D6047E for ; Wed, 12 Jul 2017 14:18:53 +0800 (CST) Received: from regular2.263xmail.com (unknown [192.168.165.161]) by transport.263xmail.com (Postfix) with ESMTP id E4BB86B2 for ; Wed, 12 Jul 2017 14:18:47 +0800 (CST) Received: from regular1.263xmail.com (unknown [192.168.165.234]) by regular2.263xmail.com (Postfix) with ESMTP id 5C12818ED31 for ; Wed, 12 Jul 2017 14:18:43 +0800 (CST) Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.171]) by regular1.263xmail.com (Postfix) with ESMTP id BB9689144; Wed, 12 Jul 2017 14:18:40 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id AF9D23C1; Wed, 12 Jul 2017 14:18:33 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <73471b09f9009587d527726b1cb03d46> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 30796KXJL9K; Wed, 12 Jul 2017 14:18:38 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Subject: [PATCH] drm: Add missing field copy in compat_drm_version Date: Wed, 12 Jul 2017 14:18:32 +0800 Message-Id: <1499840312-23418-1-git-send-email-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.1.4 Cc: briannorris@chromium.org, Jeffy Chen , dianders@chromium.org, dri-devel@lists.freedesktop.org, Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_ioc32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c index 94acf51..2789356 100644 --- a/drivers/gpu/drm/drm_ioc32.c +++ b/drivers/gpu/drm/drm_ioc32.c @@ -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;