From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:40152 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbdHDWc7 (ORCPT ); Fri, 4 Aug 2017 18:32:59 -0400 Subject: Patch "video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap" has been added to the 4.4-stable tree To: arvind.yadav.cs@gmail.com, alexander.levin@verizon.com, b.zolnierkie@samsung.com, gregkh@linuxfoundation.org, yuasa@linux-mips.org Cc: , From: Date: Fri, 04 Aug 2017 15:32:56 -0700 Message-ID: <15018859761723@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: cobalt_lcdfb: Handle return NULL error from devm_ioremap 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: video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.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 foo@baz Fri Aug 4 15:30:20 PDT 2017 From: Arvind Yadav Date: Tue, 13 Dec 2016 13:50:52 +0530 Subject: video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap From: Arvind Yadav [ Upstream commit 4dcd19bfabaee8f9f4bcf203afba09b98ccbaf76 ] Here, If devm_ioremap will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav Acked-by: Yoichi Yuasa Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/cobalt_lcdfb.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/video/fbdev/cobalt_lcdfb.c +++ b/drivers/video/fbdev/cobalt_lcdfb.c @@ -350,6 +350,11 @@ static int cobalt_lcdfb_probe(struct pla info->screen_size = resource_size(res); info->screen_base = devm_ioremap(&dev->dev, res->start, info->screen_size); + if (!info->screen_base) { + framebuffer_release(info); + return -ENOMEM; + } + info->fbops = &cobalt_lcd_fbops; info->fix = cobalt_lcdfb_fix; info->fix.smem_start = res->start; Patches currently in stable-queue which might be from arvind.yadav.cs@gmail.com are queue-4.4/vfio-pci-handle-error-from-pci_iomap.patch queue-4.4/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch