projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5b91ef
)
qxl: check for kmap failures
author
Dan Carpenter
<dan.carpenter@oracle.com>
Mon, 11 Jul 2016 08:46:33 +0000
(11:46 +0300)
committer
Willy Tarreau
<w@1wt.eu>
Fri, 10 Feb 2017 10:03:31 +0000
(11:03 +0100)
commit
f4cceb2affcd1285d4ce498089e8a79f4cd2fa66
upstream.
If kmap fails, it leads to memory corruption.
Fixes:
f64122c1f6ad
('drm: add new QXL driver. (v1.4)')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link:
http://patchwork.freedesktop.org/patch/msgid/20160711084633.GA31411@mwanda
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/gpu/drm/qxl/qxl_draw.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/qxl/qxl_draw.c
b/drivers/gpu/drm/qxl/qxl_draw.c
index 3c8c3dbf93782522eac671a3d6c8cf5f1af3e4bc..ff320522f453cf7aca022e3db274d56a18f53e02 100644
(file)
--- a/
drivers/gpu/drm/qxl/qxl_draw.c
+++ b/
drivers/gpu/drm/qxl/qxl_draw.c
@@
-114,6
+114,8
@@
static int qxl_palette_create_1bit(struct qxl_bo **palette_bo,
palette_bo);
ret = qxl_bo_kmap(*palette_bo, (void **)&pal);
+ if (ret)
+ return ret;
pal->num_ents = 2;
pal->unique = unique++;
if (visual == FB_VISUAL_TRUECOLOR || visual == FB_VISUAL_DIRECTCOLOR) {