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

2024-07-23 Thread Dmitry Osipenko
On 5/9/24 04:52, Weishi Li wrote: > @@ -356,12 +356,14 @@ static int virtio_gpu_queue_ctrl_sgs(struct > virtio_gpu_device *vgdev, > > ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC); > WARN_ON(ret); > + if (ret < 0 && ret != -ENOSPC) { > +

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

2024-05-22 Thread Weishi Li
Both virtio_gpu_queue_ctrl_buffer and virtio_gpu_queue_cursor use virtqueue_add_sgs to upload the structure virtio_gpu_vbuffer * vbuf to virtqueue. However, when the vbuf fails to upload and virtqueue_add_sgs returns -EIO or -ENOMEM, the vbuf will not be able to be free by

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

2024-05-08 Thread Weishi Li
Both virtio_gpu_queue_ctrl_buffer and virtio_gpu_queue_cursor use virtqueue_add_sgs to upload the structure virtio_gpu_vbuffer * vbuf to virtqueue. However, when the vbuf fails to upload and virtqueue_add_sgs returns -EIO or -ENOMEM, the vbuf will not be able to be free by

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

2024-05-08 Thread kernel test robot
link: https://lore.kernel.org/r/20240507033814.57906-1-liweishi%40kylinos.cn patch subject: [PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf config: i386-buildonly-randconfig-001-20240508 (https://download.01.org/0day-ci/archive/20240509/202405090747.y8ofue7r-...@intel.com/config

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

2024-05-06 Thread Weishi Li
Both virtio_gpu_queue_ctrl_buffer and virtio_gpu_queue_cursor use virtqueue_add_sgs to upload the structure virtio_gpu_vbuffer * vbuf to virtqueue. However, when the vbuf fails to upload and virtqueue_add_sgs returns -EIO or -ENOMEM, the vbuf will not be able to be free by

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

2024-04-30 Thread kernel test robot
-of-vbuf/20240430-132447 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20240429030541.56702-1-liweishi%40kylinos.cn patch subject: [PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf config: hexagon-randconfig-001-20240501 (https

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

2024-04-30 Thread kernel test robot
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20240429030541.56702-1-liweishi%40kylinos.cn patch subject: [PATCH] [PATCH RESEND] drm/virtio: fix memory leak of vbuf config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240501

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

2024-04-28 Thread Weishi Li
Both virtio_gpu_queue_ctrl_buffer and virtio_gpu_queue_cursor use virtqueue_add_sgs to upload the structure virtio_gpu_vbuffer * vbuf to virtqueue. However, when virtqueue_add_sgs returns -EIO or -ENOMEM, it means vbuf upload failed, and vbuf will not be able to be free by