* Patch "video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap" has been added to the 4.9-stable tree
@ 2017-08-04 22:33 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-04 22:33 UTC (permalink / raw)
To: arvind.yadav.cs, alexander.levin, b.zolnierkie, gregkh, yuasa
Cc: stable, stable-commits
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.9-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.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Fri Aug 4 15:30:10 PDT 2017
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Tue, 13 Dec 2016 13:50:52 +0530
Subject: video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
[ 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 <arvind.yadav.cs@gmail.com>
Acked-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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
@@ -308,6 +308,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.9/vfio-pci-handle-error-from-pci_iomap.patch
queue-4.9/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-04 22:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 22:33 Patch "video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).