Received: by 10.223.185.116 with SMTP id b49csp6365383wrg; Wed, 28 Feb 2018 08:13:40 -0800 (PST) X-Google-Smtp-Source: AH8x2241WNf99a+wjNerVrQyvdpX5hzgR+Wkn53IvFQscC6J4gqiLhOW1SFmt6VPuHeg3Sp/Vswd X-Received: by 10.99.97.205 with SMTP id v196mr14581212pgb.319.1519834420394; Wed, 28 Feb 2018 08:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519834420; cv=none; d=google.com; s=arc-20160816; b=jOpgLUyzzfLou0LM7MVs+uTS9GV5VpkfFUNcrYCTfqMAbe2RPCmen6WauKUV5f4wJg /pTg4VRdU/U7O185qe5txNs4kwj5ZnTlugUkfhXhfcRTHEbwyDSgHo0GuvuLLvtsNvKA ux8FRhI3UcQ0z4JYzOtwfixFdchnkDRpBDOZM7fjzu5GNmxymWfVHcaTLBTq1B2vxI1W aSIvbK2RLlzaRvoK607zGZa6mFAzO0lCqLse7+Pi1zJ1Qlovdpj8BBQkmmivF7BNBC34 JCjDqj9z5Sz54/GUZz0AXkgxjjiV1cUmCqZ3kNZ5DYEdg3jcQTfQUdPb4RXd4VfuIUI3 LXNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=677rKUCgGpytzO0BlNP1NF9kUU4WPiUikYQTlPxLchc=; b=n0aY5vRxrhWt5yefO//ZCOPZTxQQNkyuRvx06S4VSpFxwhJYvL7am26hUtf6gGOb95 oeO+m55JrkJnIeF5BrnS888fxJmhe9UjG40qcFDlX4WAuKwMOry8dGtCyYgzojWfiNUn eETTHZy3Rw34OxuIRHSrmLQkAczRfgzvMhxGxLty5OLKfPj3T8XbGoSlbsUM886zZbRI 3gMeU4Zm7MVi8JP4V/ORauwmOowTqW3TPB44RjUBVzckUmPtGKCCY9Jb7T2NP05sK3ab kNgOUs8arbdiolxmcKI1e6wXILUg2z9ke/7yn+zGLumKWh8012SEgp4McIOM/XCwAMZW 2Gug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si1135022pgv.774.2018.02.28.08.13.25; Wed, 28 Feb 2018 08:13:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933003AbeB1QLt (ORCPT + 99 others); Wed, 28 Feb 2018 11:11:49 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34946 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934524AbeB1QI0 (ORCPT ); Wed, 28 Feb 2018 11:08:26 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Ym-0006Xd-5X; Wed, 28 Feb 2018 15:22:24 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yl-0000Jx-3R; Wed, 28 Feb 2018 15:22:23 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Mauro Carvalho Chehab" , "Hans Verkuil" , "Daniel Mentz" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 248/254] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Mentz commit 025a26fa14f8fd55d50ab284a30c016a5be953d0 upstream. Commit b2787845fb91 ("V4L/DVB (5289): Add support for video output overlays.") added the field global_alpha to struct v4l2_window but did not update the compat layer accordingly. This change adds global_alpha to struct v4l2_window32 and copies the value for global_alpha back and forth. Signed-off-by: Daniel Mentz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Ben Hutchings --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c @@ -45,6 +45,7 @@ struct v4l2_window32 { compat_caddr_t clips; /* actually struct v4l2_clip32 * */ __u32 clipcount; compat_caddr_t bitmap; + __u8 global_alpha; }; static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) @@ -53,7 +54,8 @@ static int get_v4l2_window32(struct v4l2 copy_from_user(&kp->w, &up->w, sizeof(up->w)) || get_user(kp->field, &up->field) || get_user(kp->chromakey, &up->chromakey) || - get_user(kp->clipcount, &up->clipcount)) + get_user(kp->clipcount, &up->clipcount) || + get_user(kp->global_alpha, &up->global_alpha)) return -EFAULT; if (kp->clipcount > 2048) return -EINVAL; @@ -86,7 +88,8 @@ static int put_v4l2_window32(struct v4l2 if (copy_to_user(&up->w, &kp->w, sizeof(kp->w)) || put_user(kp->field, &up->field) || put_user(kp->chromakey, &up->chromakey) || - put_user(kp->clipcount, &up->clipcount)) + put_user(kp->clipcount, &up->clipcount) || + put_user(kp->global_alpha, &up->global_alpha)) return -EFAULT; return 0; }