Patch "drm/savage: dereferencing an error pointer" has been added to the 4.9-stable tree
Subsystems (3)
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 <[email protected]> know about it.
Quoted 1 line
From
f7741aa75e76440f4e9ecfe512feebe9bce33ca8Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Wed, 12 Oct 2016 09:22:27 +0300
Subject: drm/savage: dereferencing an error pointer
From: Dan Carpenter <[email protected]>
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.
--- drivers/gpu/drm/savage/savage_state.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/savage/savage_state.c +1 -0
@@ -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 [email protected] 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