From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38616 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbdFRBLQ (ORCPT ); Sat, 17 Jun 2017 21:11:16 -0400 Subject: Patch "[media] vb2: Fix an off by one error in 'vb2_plane_vaddr'" has been added to the 4.4-stable tree To: christophe.jaillet@wanadoo.fr, gregkh@linuxfoundation.org, hans.verkuil@cisco.com, mchehab@s-opensource.com, sakari.ailus@linux.intel.com Cc: , From: Date: Sun, 18 Jun 2017 09:09:11 +0800 Message-ID: <1497748151135230@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] vb2: Fix an off by one error in 'vb2_plane_vaddr' to the 4.4-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: vb2-fix-an-off-by-one-error-in-vb2_plane_vaddr.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 5ebb6dd36c9f5fb37b1077b393c254d70a14cb46 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Fri, 28 Apr 2017 01:51:40 -0300 Subject: [media] vb2: Fix an off by one error in 'vb2_plane_vaddr' From: Christophe JAILLET commit 5ebb6dd36c9f5fb37b1077b393c254d70a14cb46 upstream. We should ensure that 'plane_no' is '< vb->num_planes' as done in 'vb2_plane_cookie' just a few lines below. Fixes: e23ccc0ad925 ("[media] v4l: add videobuf2 Video for Linux 2 driver framework") Signed-off-by: Christophe JAILLET Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/v4l2-core/videobuf2-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -793,7 +793,7 @@ EXPORT_SYMBOL_GPL(vb2_core_create_bufs); */ void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no) { - if (plane_no > vb->num_planes || !vb->planes[plane_no].mem_priv) + if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv) return NULL; return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv); Patches currently in stable-queue which might be from christophe.jaillet@wanadoo.fr are queue-4.4/vb2-fix-an-off-by-one-error-in-vb2_plane_vaddr.patch queue-4.4/serial-efm32-fix-parity-management-in-efm32_uart_console_get_options.patch