qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Pan Nengyuan <pannengyuan@huawei.com>, mst@redhat.com
Cc: zhang.zhanghailiang@huawei.com, qemu-devel@nongnu.org,
	euler.robot@huawei.com
Subject: Re: [PATCH 3/4] virtio-pmem: do delete rq_vq in virtio_pmem_unrealize
Date: Tue, 25 Feb 2020 10:21:23 +0100	[thread overview]
Message-ID: <b14afc54-6cf1-a99c-7612-b9b6c4f70816@redhat.com> (raw)
In-Reply-To: <20200225075554.10835-4-pannengyuan@huawei.com>

On 2/25/20 8:55 AM, Pan Nengyuan wrote:
> Similar to other virtio-deivces, rq_vq forgot to delete in virtio_pmem_unrealize, this patch fix it.

"devices"

> This device has aleardy maintained a vq pointer, thus we use the new virtio_delete_queue function directly to do the cleanup.

"already"

> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   hw/virtio/virtio-pmem.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
> index 97287e923b..43399522f5 100644
> --- a/hw/virtio/virtio-pmem.c
> +++ b/hw/virtio/virtio-pmem.c
> @@ -130,6 +130,7 @@ static void virtio_pmem_unrealize(DeviceState *dev, Error **errp)
>       VirtIOPMEM *pmem = VIRTIO_PMEM(dev);
>   
>       host_memory_backend_set_mapped(pmem->memdev, false);
> +    virtio_delete_queue(pmem->rq_vq);
>       virtio_cleanup(vdev);
>   }
>   
> 



  reply	other threads:[~2020-02-25  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  7:55 [PATCH 0/4] virtio: fix some virtio-queue leaks Pan Nengyuan
2020-02-25  7:55 ` [PATCH 1/4] vhost-user-fs: do delete virtio_queues in unrealize Pan Nengyuan
2020-02-25  7:55 ` [PATCH 2/4] vhost-user-fs: convert to the new virtio_delete_queue function Pan Nengyuan
2020-02-25  7:55 ` [PATCH 3/4] virtio-pmem: do delete rq_vq in virtio_pmem_unrealize Pan Nengyuan
2020-02-25  9:21   ` Philippe Mathieu-Daudé [this message]
2020-02-25  7:55 ` [PATCH 4/4] virtio-crypto: do delete ctrl_vq in virtio_crypto_device_unrealize Pan Nengyuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b14afc54-6cf1-a99c-7612-b9b6c4f70816@redhat.com \
    --to=philmd@redhat.com \
    --cc=euler.robot@huawei.com \
    --cc=mst@redhat.com \
    --cc=pannengyuan@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).