* Patch "drm/virtio: don't leak bo on drm_gem_object_init failure" has been added to the 4.9-stable tree
@ 2017-07-07 9:51 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-07 9:51 UTC (permalink / raw)
To: kraxel, gregkh, liqiang6-s; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/virtio: don't leak bo on drm_gem_object_init failure
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-virtio-don-t-leak-bo-on-drm_gem_object_init-failure.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 385aee965b4e4c36551c362a334378d2985b722a Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Thu, 6 Apr 2017 17:59:40 +0200
Subject: drm/virtio: don't leak bo on drm_gem_object_init failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Gerd Hoffmann <kraxel@redhat.com>
commit 385aee965b4e4c36551c362a334378d2985b722a upstream.
Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -81,8 +81,10 @@ int virtio_gpu_object_create(struct virt
return -ENOMEM;
size = roundup(size, PAGE_SIZE);
ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size);
- if (ret != 0)
+ if (ret != 0) {
+ kfree(bo);
return ret;
+ }
bo->dumb = false;
virtio_gpu_init_ttm_placement(bo, pinned);
Patches currently in stable-queue which might be from kraxel@redhat.com are
queue-4.9/drm-virtio-don-t-leak-bo-on-drm_gem_object_init-failure.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-07 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 9:51 Patch "drm/virtio: don't leak bo on drm_gem_object_init failure" has been added to the 4.9-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.