mbox series

[0/2] delete virtio queues in virtio_scsi_unrealize

Message ID 20200117075547.60864-1-pannengyuan@huawei.com
Headers show
Series delete virtio queues in virtio_scsi_unrealize | expand

Message

Pan Nengyuan Jan. 17, 2020, 7:55 a.m. UTC
From: Pan Nengyuan <pannengyuan@huawei.com>

This serie patch fix memleaks when detaching virtio-scsi device. 
1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to merge.
   As the discussion in https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html

2. replace virtio_del_queue to virtio_delete_queue to make it more clear.

Pan Nengyuan (2):
  virtio-scsi: delete vqs in unrealize to avoid memleaks
  virtio-scsi: convert to new virtio_delete_queue

 hw/scsi/virtio-scsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Stefan Hajnoczi Jan. 20, 2020, 2:35 p.m. UTC | #1
On Fri, Jan 17, 2020 at 03:55:45PM +0800, pannengyuan@huawei.com wrote:
> From: Pan Nengyuan <pannengyuan@huawei.com>
> 
> This serie patch fix memleaks when detaching virtio-scsi device. 
> 1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to merge.
>    As the discussion in https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html
> 
> 2. replace virtio_del_queue to virtio_delete_queue to make it more clear.
> 
> Pan Nengyuan (2):
>   virtio-scsi: delete vqs in unrealize to avoid memleaks
>   virtio-scsi: convert to new virtio_delete_queue
> 
>  hw/scsi/virtio-scsi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> -- 
> 2.21.0.windows.1
> 
> 
> 

The patches could be squashed by the maintainer, but the code changes
are fine:

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Paolo Bonzini Jan. 21, 2020, 4:23 p.m. UTC | #2
On 17/01/20 08:55, pannengyuan@huawei.com wrote:
> From: Pan Nengyuan <pannengyuan@huawei.com>
> 
> This serie patch fix memleaks when detaching virtio-scsi device. 
> 1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to merge.
>    As the discussion in https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html
> 
> 2. replace virtio_del_queue to virtio_delete_queue to make it more clear.
> 
> Pan Nengyuan (2):
>   virtio-scsi: delete vqs in unrealize to avoid memleaks
>   virtio-scsi: convert to new virtio_delete_queue
> 
>  hw/scsi/virtio-scsi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Queued, thanks.

Paolo