From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34634 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbcBMXDH (ORCPT ); Sat, 13 Feb 2016 18:03:07 -0500 Subject: Patch "[media] media: v4l2-ctrls: Fix 64bit support in get_ctrl()" has been added to the 4.3-stable tree To: bparrot@ti.com, gregkh@linuxfoundation.org, hans.verkuil@cisco.com, mchehab@osg.samsung.com Cc: , From: Date: Sat, 13 Feb 2016 15:03:06 -0800 Message-ID: <145540458655186@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled [media] media: v4l2-ctrls: Fix 64bit support in get_ctrl() to the 4.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-v4l2-ctrls-fix-64bit-support-in-get_ctrl.patch and it can be found in the queue-4.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From a8077734055f870ba630563868a6349671ca8dfc Mon Sep 17 00:00:00 2001 From: Benoit Parrot Date: Mon, 21 Sep 2015 13:03:21 -0300 Subject: [media] media: v4l2-ctrls: Fix 64bit support in get_ctrl() From: Benoit Parrot commit a8077734055f870ba630563868a6349671ca8dfc upstream. When trying to use v4l2_ctrl_g_ctrl_int64() to retrieve a V4L2_CTRL_TYPE_INTEGER64 type value the internal helper function get_ctrl() would prematurely exit because for this control type the 'is_int' flag is not set. This would result in v4l2_ctrl_g_ctrl_int64 always returning 0. Also v4l2_ctrl_g_ctrl_int64() is reading and returning the 32bit value member instead of the 64bit version, so fixing that as well. This patch extends the condition check to allow the V4L2_CTRL_TYPE_INTEGER64 type to continue processing instead of exiting. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/v4l2-core/v4l2-ctrls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -2884,7 +2884,7 @@ static int get_ctrl(struct v4l2_ctrl *ct * cur_to_user() calls below would need to be modified not to access * userspace memory when called from get_ctrl(). */ - if (!ctrl->is_int) + if (!ctrl->is_int && ctrl->type != V4L2_CTRL_TYPE_INTEGER64) return -EINVAL; if (ctrl->flags & V4L2_CTRL_FLAG_WRITE_ONLY) @@ -2942,9 +2942,9 @@ s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_c /* It's a driver bug if this happens. */ WARN_ON(ctrl->is_ptr || ctrl->type != V4L2_CTRL_TYPE_INTEGER64); - c.value = 0; + c.value64 = 0; get_ctrl(ctrl, &c); - return c.value; + return c.value64; } EXPORT_SYMBOL(v4l2_ctrl_g_ctrl_int64); Patches currently in stable-queue which might be from bparrot@ti.com are queue-4.3/media-v4l2-ctrls-fix-64bit-support-in-get_ctrl.patch