Received: by 10.223.185.116 with SMTP id b49csp2162922wrg; Thu, 15 Feb 2018 07:28:57 -0800 (PST) X-Google-Smtp-Source: AH8x227UDaQcVmKQefkiu8dvmiWBaooISn8aWe0kcKuTHyCXw9IjGGY6HyPdjrIkCjbyfw0RIimf X-Received: by 10.98.138.129 with SMTP id o1mr3011096pfk.182.1518708537769; Thu, 15 Feb 2018 07:28:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518708537; cv=none; d=google.com; s=arc-20160816; b=oGYNvNVL9X6A3YPQFgPWDOAVQEjO3EyyAGSDQDdR8uchlGssqtzhyw+aLKG3t20JNO 48/dagg+Grz4WWL+Aary21cYloDwF9IFfvKe+lVdX/Hwszd8CwS0xkSsRfoO0JQJKDnr QDRopNf8wIwxM3daxftrsaC6Y0JlOY0JASncoi8Q76bN9YrsBoXvn+HmwMkVjsJZoy0u 6CFdVMJvtSMwaPGW+cl31ZfcAe7h/36a2a+xJSWXgS3WFbeoPeK8LT/9qzHpdUGfpf1i d7WKUIBYYiLC1jHB2nK8B1ra0ly52HOALv0Z1svQE7xZPSWWfBk7ZtSia6a2dHbOGS94 eoKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=j2kcIO/ClQFAkOnE38IFpHcHgFwh+VgiNWCaxAUlKsA=; b=IeLqE0fam4iUjbmg6t0nvhyfs/+NwiHGYrvrQuNxl2eC+7ZB4/VpXgbzmh7aDY9foo 7LjegClx6VeU9rsrprrtyc0NJ4sje6GWqBAoIlYG91w4qUr7/sKUThUuIHS6otMamGUq wGsW3IQlC8DJkKqJukFSkXVFA9deQmWEXc0kr8NkUaSWuZkouYQRq0KiwWHGqEgmyJWy 0b8/EYRBmR7vzC2tZuovWxQXAN1fiA34tI4c7ugN7EkSX/Xq3IHFY/TqoMxil/rdWHkW 9cv9+T1RqFI/9YBHd4c9QFbvpygpEsyXVL60U4EMYEyQ0XwpCjagMgVEZllivqtsTkOo VwyA== 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 a13si29122pgt.572.2018.02.15.07.28.42; Thu, 15 Feb 2018 07:28:57 -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 S1163607AbeBOP11 (ORCPT + 99 others); Thu, 15 Feb 2018 10:27:27 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:53438 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163590AbeBOP1X (ORCPT ); Thu, 15 Feb 2018 10:27:23 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C51B1BD1; Thu, 15 Feb 2018 15:27:22 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Daniel Mentz , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 4.9 44/88] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha Date: Thu, 15 Feb 2018 16:17:11 +0100 Message-Id: <20180215151228.772097938@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151222.437136975@linuxfoundation.org> References: <20180215151222.437136975@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable 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: Greg Kroah-Hartman --- 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; }