All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: leixiang <leixiang@kylinos.cn>
Cc: qemu-devel@nongnu.org, xieming@kylinos.cn, zengchi@kylinos.cn
Subject: Re: [RESEND PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers
Date: Wed, 30 Nov 2022 01:59:28 -0500	[thread overview]
Message-ID: <20221130015901-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20221130055611.1037023-1-leixiang@kylinos.cn>

On Wed, Nov 30, 2022 at 01:56:11PM +0800, leixiang wrote:
> proxy->vector_irqfd did not free when set guest notifier failed.
> 
> Signed-off-by: Lei Xiang <leixiang@kylinos.cn>
> Tested-by: Zeng Chi <zengchi@kylinos.cn>
> Suggested-by: Xie Ming <xieming@kylinos.cn>

Thanks a lot!  Fixes tag? When was the leak introduced?

> ---
>  hw/virtio/virtio-pci.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index c6b47a9c..4862f83b 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -1038,6 +1038,12 @@ assign_error:
>      while (--n >= 0) {
>          virtio_pci_set_guest_notifier(d, n, !assign, with_irqfd);
>      }
> +
> +   g_free(proxy->vector_irqfd);
> +   proxy->vector_irqfd = NULL;
> +
>      return r;
>  }
>  
> -- 
> 
> 
> No virus found
> 		Checked by Hillstone Network AntiVirus



  reply	other threads:[~2022-11-30  6:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  0:25 [PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers Lei Xiang
2022-08-26  3:06 ` [RESEND PATCH] " leixiang
2022-11-30  5:52   ` leixiang
2022-11-30  5:56   ` leixiang
2022-11-30  6:59     ` Michael S. Tsirkin [this message]
2022-12-20 14:42     ` Michael S. Tsirkin
2022-12-27  8:16       ` [RESEND PATCH] virtio-pci: fix proxy->vector_irqfd " leixiang

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=20221130015901-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=leixiang@kylinos.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=xieming@kylinos.cn \
    --cc=zengchi@kylinos.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.