[PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf

2024-05-22 Thread Weishi Li
*_func, resulting in a continuous increase in memory allocated to vgdev ->vbufs. Therefore, make virtio_gpu_queue_ctrl_sgs and virtio_gpu_queue_cursor free vbuf directly after virtqueue_add_sgs returns -EIO or -ENOMEM. Signed-off-by: Weishi Li --- drivers/gpu/drm/virtio/virtgpu_vq.c |

[PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf

2024-05-08 Thread Weishi Li
*_func, resulting in a continuous increase in memory allocated to vgdev ->vbufs. Therefore, make virtio_gpu_queue_ctrl_sgs and virtio_gpu_queue_cursor free vbuf directly after virtqueue_add_sgs returns -EIO or -ENOMEM. Signed-off-by: Weishi Li --- drivers/gpu/drm/virtio/virtgpu_vq.c |

[PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf

2024-05-06 Thread Weishi Li
*_func, resulting in a continuous increase in memory allocated to vgdev ->vbufs. Therefore, make virtio_gpu_queue_ctrl_sgs and virtio_gpu_queue_cursor free vbuf directly after virtqueue_add_sgs returns -EIO or -ENOMEM. Signed-off-by: Weishi Li --- drivers/gpu/drm/virtio/virtgpu_vq.c |

[PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf

2024-04-28 Thread Weishi Li
*_func, resulting in a continuous increase in memory allocated to vgdev ->vbufs. Therefore, when upload fails,vbuf needs to be free directly. Signed-off-by: Weishi Li --- drivers/gpu/drm/virtio/virtgpu_vq.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/

[PATCH] drm/virtio: fix memory leak of vbuf

2024-04-02 Thread Weishi Li
*_func, resulting in a continuous increase in memory allocated to vgdev ->vbufs. Therefore, when upload fails,vbuf needs to be free directly. Signed-off-by: Weishi Li --- drivers/gpu/drm/virtio/virtgpu_vq.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/