Greg KH
2020-Aug-07 05:52 UTC
[PATCH v3] drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()
On Fri, Aug 07, 2020 at 11:00:11AM +0800, ?? wrote:> Xin He <hexin.op at bytedance.com> ?2020?7?21??? ??6:17??? > > > > From: Qi Liu <liuqi.16 at bytedance.com> > > > > We should put the reference count of the fence after calling > > virtio_gpu_cmd_submit(). So add the missing dma_fence_put(). > > > > Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization") > > Co-developed-by: Xin He <hexin.op at bytedance.com> > > Signed-off-by: Xin He <hexin.op at bytedance.com> > > Signed-off-by: Qi Liu <liuqi.16 at bytedance.com> > > Reviewed-by: Muchun Song <songmuchun at bytedance.com> > > --- > > > > changelog in v3: > > 1) Change the subject from "drm/virtio: fixed memory leak in virtio_gpu_execbuffer_ioctl()" to > > "drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()" > > 2) Rework the commit log > > > > changelog in v2: > > 1) Add a change description > > > > drivers/gpu/drm/virtio/virtgpu_ioctl.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c > > index 5df722072ba0..19c5bc01eb79 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; > > > > -- > > 2.21.1 (Apple Git-122.3) > > > > cc GregWhy? $ ./scripts/get_maintainer.pl --file drivers/gpu/drm/virtio/virtgpu_ioctl.c David Airlie <airlied at linux.ie> (maintainer:VIRTIO GPU DRIVER) Gerd Hoffmann <kraxel at redhat.com> (maintainer:VIRTIO GPU DRIVER) Daniel Vetter <daniel at ffwll.ch> (maintainer:DRM DRIVERS) Sumit Semwal <sumit.semwal at linaro.org> (maintainer:DMA BUFFER SHARING FRAMEWORK) "Christian K?nig" <christian.koenig at amd.com> (maintainer:DMA BUFFER SHARING FRAMEWORK) dri-devel at lists.freedesktop.org (open list:VIRTIO GPU DRIVER) virtualization at lists.linux-foundation.org (open list:VIRTIO GPU DRIVER) linux-kernel at vger.kernel.org (open list) linux-media at vger.kernel.org (open list:DMA BUFFER SHARING FRAMEWORK) linaro-mm-sig at lists.linaro.org (moderated list:DMA BUFFER SHARING FRAMEWORK)
Maybe Matching Threads
- [PATCH v3] drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()
- [PATCH AUTOSEL 5.8 06/63] drm/virtio: fix memory leak in virtio_gpu_cleanup_object()
- [PATCH AUTOSEL 5.7 05/54] drm/virtio: fix memory leak in virtio_gpu_cleanup_object()
- [PATCH v4 43/48] drm/ttm: introduce pool_shrink_rwsem
- [PATCH v2 07/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing