* [PATCH] drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create()
@ 2021-10-09 9:09 Jing Xiangfeng
2021-10-11 9:19 ` Gerd Hoffmann
0 siblings, 1 reply; 3+ messages in thread
From: Jing Xiangfeng @ 2021-10-09 9:09 UTC (permalink / raw)
To: airlied, kraxel, daniel
Cc: dri-devel, virtualization, linux-kernel, jingxiangfeng
virtio_gpu_user_framebuffer_create() misses to call drm_gem_object_put()
in an error path. Add the missed function call to fix it.
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index a6caebd4a0dd..5b00310ac4cd 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -308,8 +308,10 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
return ERR_PTR(-EINVAL);
virtio_gpu_fb = kzalloc(sizeof(*virtio_gpu_fb), GFP_KERNEL);
- if (virtio_gpu_fb == NULL)
+ if (virtio_gpu_fb == NULL) {
+ drm_gem_object_put(obj);
return ERR_PTR(-ENOMEM);
+ }
ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj);
if (ret) {
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create()
2021-10-09 9:09 [PATCH] drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create() Jing Xiangfeng
@ 2021-10-11 9:19 ` Gerd Hoffmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2021-10-11 9:19 UTC (permalink / raw)
To: Jing Xiangfeng; +Cc: airlied, daniel, dri-devel, virtualization, linux-kernel
On Sat, Oct 09, 2021 at 05:09:20PM +0800, Jing Xiangfeng wrote:
> virtio_gpu_user_framebuffer_create() misses to call drm_gem_object_put()
> in an error path. Add the missed function call to fix it.
Pushed to drm-misc-next.
thanks,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create()
@ 2021-10-11 9:19 ` Gerd Hoffmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2021-10-11 9:19 UTC (permalink / raw)
To: Jing Xiangfeng; +Cc: airlied, linux-kernel, dri-devel, daniel, virtualization
On Sat, Oct 09, 2021 at 05:09:20PM +0800, Jing Xiangfeng wrote:
> virtio_gpu_user_framebuffer_create() misses to call drm_gem_object_put()
> in an error path. Add the missed function call to fix it.
Pushed to drm-misc-next.
thanks,
Gerd
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-11 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09 9:09 [PATCH] drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create() Jing Xiangfeng
2021-10-11 9:19 ` Gerd Hoffmann
2021-10-11 9:19 ` Gerd Hoffmann
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.