qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers
@ 2022-08-09  0:25 Lei Xiang
  2022-08-26  3:06 ` [RESEND PATCH] " leixiang
  0 siblings, 1 reply; 7+ messages in thread
From: Lei Xiang @ 2022-08-09  0:25 UTC (permalink / raw)
  To: mst; +Cc: qemu-devel, xieming, Lei Xiang, Lei Xiang

From: Lei Xiang <ninollx@hotmail.com>

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>
---
 hw/virtio/virtio-pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 45327f0..75188a9 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1058,6 +1058,10 @@ 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;
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-27  8:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-12-20 14:42     ` Michael S. Tsirkin
2022-12-27  8:16       ` [RESEND PATCH] virtio-pci: fix proxy->vector_irqfd " leixiang

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).