diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-19 05:54:22 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-19 05:54:42 +0200 |
commit | f2ea2578df8e67d763156a0bf0d06b1c81ef0985 (patch) | |
tree | 8d3b2151209e335f5e7fcce7c41ffda63d783c24 /drivers/gpu | |
parent | Linux 5.9-rc1 (diff) | |
parent | drm/virtio: fix memory leak in virtio_gpu_cleanup_object() (diff) | |
download | linux-f2ea2578df8e67d763156a0bf0d06b1c81ef0985.tar.xz linux-f2ea2578df8e67d763156a0bf0d06b1c81ef0985.zip |
Merge tag 'drm-misc-fixes-2020-08-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
drm-misc-fixes for v5.9-rc1:
- Add missing dma_fence_put() in virtio_gpu_execbuffer_ioctl().
- Fix memory leak in virtio_gpu_cleanup_object().
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d50eb2e0-75c8-b724-006f-5e7b391961ff@linux.intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_ioctl.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_object.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 7a2430e34e00..c8da7adc6b30 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -179,6 +179,7 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, vfpriv->ctx_id, buflist, out_fence); + dma_fence_put(&out_fence->f); virtio_gpu_notify(vgdev); return 0; diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 2cdd3cd9ce75..e83651b7747d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -79,6 +79,7 @@ void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo) } sg_free_table(shmem->pages); + kfree(shmem->pages); shmem->pages = NULL; drm_gem_shmem_unpin(&bo->base.base); } |