* Patch "drm/savage: dereferencing an error pointer" has been added to the 4.9-stable tree
@ 2017-01-15 16:39 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-15 16:39 UTC (permalink / raw)
To: dan.carpenter, daniel.vetter, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/savage: dereferencing an error pointer
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:
drm-savage-dereferencing-an-error-pointer.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 f7741aa75e76440f4e9ecfe512feebe9bce33ca8 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 12 Oct 2016 09:22:27 +0300
Subject: drm/savage: dereferencing an error pointer
From: Dan Carpenter <dan.carpenter@oracle.com>
commit f7741aa75e76440f4e9ecfe512feebe9bce33ca8 upstream.
A recent cleanup changed the kmalloc() + copy_from_user() to
memdup_user() but the error handling wasn't updated so we might call
kfree(-EFAULT) and crash.
Fixes: a6e3918bcdb1 ('GPU-DRM-Savage: Use memdup_user() rather than duplicating')
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/20161012062227.GU12841@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/savage/savage_state.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/savage/savage_state.c
+++ b/drivers/gpu/drm/savage/savage_state.c
@@ -1004,6 +1004,7 @@ int savage_bci_cmdbuf(struct drm_device
kvb_addr = memdup_user(cmdbuf->vb_addr, cmdbuf->vb_size);
if (IS_ERR(kvb_addr)) {
ret = PTR_ERR(kvb_addr);
+ kvb_addr = NULL;
goto done;
}
cmdbuf->vb_addr = kvb_addr;
Patches currently in stable-queue which might be from dan.carpenter@oracle.com are
queue-4.9/drm-vc4-fix-a-couple-error-codes-in-vc4_cl_lookup_bos.patch
queue-4.9/drm-savage-dereferencing-an-error-pointer.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-15 16:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-15 16:39 Patch "drm/savage: dereferencing an error pointer" 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).