Received: by 10.213.65.68 with SMTP id h4csp707818imn; Wed, 28 Mar 2018 11:18:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx49XXhtTdQXn7Ecvf/YrCsKkzxitRkuMwtiXxLau9V+Y/2XYYkoIO6WLNOwNUtrnDHbUW0yp X-Received: by 2002:a17:902:d214:: with SMTP id t20-v6mr4736863ply.209.1522261106790; Wed, 28 Mar 2018 11:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522261106; cv=none; d=google.com; s=arc-20160816; b=EUJlwHuXo3UUmOQclXWen2oXpiaUZg0dL+UvVw9kJNBfXBsTr3W1uPlVS7D5cC5Vfz koFnpi2euKJBOktQKsE6hbFN/MUzPaIhPZvRNK3/PTOvk+pMDai1U+btm0mAR5dZGgyV 1QiYEezdS7FodXbpHJU1fA9jAaz2Ay0E2rXnFbNEnR1XNCzH+6aPewnADzsCI+EYT0XG 9LsUcOpG+ecqOyhGW6mH3m2D4EmS4xtoiVUCLIdwCkW4J86ulsJP84NKwuOvOPJFJuaV CxoTq6XQofhnKf3cCTkUsKxkiwhX7enGzAsp5VL2BAhyT6zHXVnfBEX6MBXRJhs0/x8p 8yfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9hujvyoYN0eSRrrw8KypHsr2Pm7RGIoJcG6su58IBWc=; b=H3l5jJd6FLWJCuvXW/ZWqLrRf8xyT6l0YA7flsEtp5fpzbHLlYvwOFQ3irGCO9V9UG qt8SNAbwjMz80eGlGHsbK9E2JG9NPI8ALF3CJGqUHfF2IH4ujIwU1RI0YW74QnAubgGq xhpxd58W9qS9Rt7pH6MJsweG9/AYOcDU7s1Ip9n1njgRUMTiqa87twYExxVH5A1XvOne S/aRAIeO2iSG4YzhjFZLdlDNMAGD6LeR7cytx/atnviyqn1kfMopPrhxRyDAtn1lhUIJ Xm4kW/eC0ZrQHMy+JGS36JvlOy/NYCb7wVNA2VbdPokp67iWPGNatrX1fnme73sWNgew NtMQ== 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 f4-v6si1294302plr.352.2018.03.28.11.18.11; Wed, 28 Mar 2018 11:18:26 -0700 (PDT) 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 S1753533AbeC1SND (ORCPT + 99 others); Wed, 28 Mar 2018 14:13:03 -0400 Received: from osg.samsung.com ([64.30.133.232]:34698 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753141AbeC1SM5 (ORCPT ); Wed, 28 Mar 2018 14:12:57 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 70B813B537; Wed, 28 Mar 2018 11:12:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ocUu8f35RkjC; Wed, 28 Mar 2018 11:12:56 -0700 (PDT) Received: from smtp.s-opensource.com (177.205.88.90.dynamic.adsl.gvt.net.br [177.205.88.90]) by osg.samsung.com (Postfix) with ESMTPSA id C2E393B4D7; Wed, 28 Mar 2018 11:12:40 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f1FYs-0005Je-Cf; Wed, 28 Mar 2018 15:12:38 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List , stable@vger.kernel.org Cc: Daniel Mentz , Mauro Carvalho Chehab , Linux Kernel Mailing List , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH for v3.18 10/18] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha Date: Wed, 28 Mar 2018 15:12:29 -0300 Message-Id: <63c220c11ade842157669d03bdaf10b84a6d91a9.1522260310.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Sasha Levin --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c index bd4890769e0b..fd32c9ccc2bb 100644 --- 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_window *kp, struct v4l2_window32 __user 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_window *kp, struct v4l2_window32 __user 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; } -- 2.14.3