From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:33624 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752415AbeCPOQ4 (ORCPT ); Fri, 16 Mar 2018 10:16:56 -0400 Subject: Patch "media: davinci: vpif_capture: add NULL check on devm_kzalloc return value" has been added to the 4.15-stable tree To: garsilva@embeddedor.com, alexander.levin@microsoft.com, gregkh@linuxfoundation.org, hans.verkuil@cisco.com, mchehab@s-opensource.com Cc: , From: Date: Fri, 16 Mar 2018 15:15:49 +0100 Message-ID: <1521209749106181@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: davinci: vpif_capture: add NULL check on devm_kzalloc return value to the 4.15-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-davinci-vpif_capture-add-null-check-on-devm_kzalloc-return-value.patch and it can be found in the queue-4.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Mar 16 15:11:08 CET 2018 From: "Gustavo A. R. Silva" Date: Wed, 22 Nov 2017 22:34:44 -0500 Subject: media: davinci: vpif_capture: add NULL check on devm_kzalloc return value From: "Gustavo A. R. Silva" [ Upstream commit 5a18c2434f8bfc8bc2fb0f8af3e44f7408d63e4f ] Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected with the help of Coccinelle. Fixes: 4a5f8ae50b66 ("[media] davinci: vpif_capture: get subdevs from DT when available") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/davinci/vpif_capture.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1550,6 +1550,8 @@ vpif_capture_get_pdata(struct platform_d sizeof(*chan->inputs) * VPIF_CAPTURE_NUM_CHANNELS, GFP_KERNEL); + if (!chan->inputs) + return NULL; chan->input_count++; chan->inputs[i].input.type = V4L2_INPUT_TYPE_CAMERA; Patches currently in stable-queue which might be from garsilva@embeddedor.com are queue-4.15/media-davinci-vpif_capture-add-null-check-on-devm_kzalloc-return-value.patch