From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:52460 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163AbcKIK1n (ORCPT ); Wed, 9 Nov 2016 05:27:43 -0500 Subject: Patch "video: fbdev: pxafb: potential NULL dereference on error" has been added to the 4.8-stable tree To: dan.carpenter@oracle.com, gregkh@linuxfoundation.org, robert.jarzmik@free.fr, tomi.valkeinen@ti.com Cc: , From: Date: Wed, 09 Nov 2016 11:27:19 +0100 Message-ID: <147868723912888@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 video: fbdev: pxafb: potential NULL dereference on error to the 4.8-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: video-fbdev-pxafb-potential-null-dereference-on-error.patch and it can be found in the queue-4.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From e0299908d606a99e7ffb467bc3c11dfe54133af3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 15 Jul 2016 14:07:32 +0300 Subject: video: fbdev: pxafb: potential NULL dereference on error From: Dan Carpenter commit e0299908d606a99e7ffb467bc3c11dfe54133af3 upstream. If we "goto out;" then it calls display_timings_release(timings); Since "timings" is NULL, that's going to oops. Just return directly. Fixes: 420a488278e8 ('video: fbdev: pxafb: initial devicetree conversion') Signed-off-by: Dan Carpenter Acked-by: Robert Jarzmik Signed-off-by: Tomi Valkeinen Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/pxafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2125,7 +2125,7 @@ static int of_get_pxafb_display(struct d timings = of_get_display_timings(disp); if (!timings) - goto out; + return -EINVAL; ret = -ENOMEM; info->modes = kmalloc_array(timings->num_timings, Patches currently in stable-queue which might be from dan.carpenter@oracle.com are queue-4.8/ubi-fastmap-fix-add_vol-return-value-test-in-ubi_attach_fastmap.patch queue-4.8/video-fbdev-pxafb-potential-null-dereference-on-error.patch