[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/22] vhost: fix the fd leak
From: |
Michael S. Tsirkin |
Subject: |
[PULL 14/22] vhost: fix the fd leak |
Date: |
Thu, 3 Aug 2023 18:21:29 -0400 |
From: Li Feng <fengli@smartx.com>
When the vhost-user reconnect to the backend, the notifer should be
cleanup. Otherwise, the fd resource will be exhausted.
Fixes: f9a09ca3ea ("vhost: add support for configure interrupt")
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20230731121018.2856310-2-fengli@smartx.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
---
hw/virtio/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index abf0d03c8d..e2f6ffb446 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -2044,6 +2044,8 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice
*vdev, bool vrings)
event_notifier_test_and_clear(
&hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier);
event_notifier_test_and_clear(&vdev->config_notifier);
+ event_notifier_cleanup(
+ &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier);
trace_vhost_dev_stop(hdev, vdev->name, vrings);
--
MST
- [PULL 05/22] tests: acpi: x86: whitelist expected blobs, (continued)
- [PULL 05/22] tests: acpi: x86: whitelist expected blobs, Michael S. Tsirkin, 2023/08/03
- [PULL 06/22] x86: acpi: workaround Windows not handling name references in Package properly, Michael S. Tsirkin, 2023/08/03
- [PULL 08/22] tests: acpi: whitelist expected blobs, Michael S. Tsirkin, 2023/08/03
- [PULL 07/22] tests: acpi: x86: update expected blobs, Michael S. Tsirkin, 2023/08/03
- [PULL 09/22] acpi: x86: remove _ADR on host bridges, Michael S. Tsirkin, 2023/08/03
- [PULL 10/22] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/08/03
- [PULL 11/22] hw/virtio: qmp: add RING_RESET to 'info virtio-status', Michael S. Tsirkin, 2023/08/03
- [PULL 12/22] virtio: Fix packed virtqueue used_idx mask, Michael S. Tsirkin, 2023/08/03
- [PULL 13/22] pci: do not respond config requests after PCI device eject, Michael S. Tsirkin, 2023/08/03
- [PULL 14/22] vhost: fix the fd leak,
Michael S. Tsirkin <=
- [PULL 15/22] hw/i386/intel_iommu: Fix trivial endianness problems, Michael S. Tsirkin, 2023/08/03
- [PULL 16/22] hw/i386/intel_iommu: Fix endianness problems related to VTD_IR_TableEntry, Michael S. Tsirkin, 2023/08/03
- [PULL 17/22] hw/i386/intel_iommu: Fix struct VTDInvDescIEC on big endian hosts, Michael S. Tsirkin, 2023/08/03
- [PULL 18/22] hw/i386/intel_iommu: Fix index calculation in vtd_interrupt_remap_msi(), Michael S. Tsirkin, 2023/08/03
- [PULL 19/22] hw/i386/x86-iommu: Fix endianness issue in x86_iommu_irq_to_msi_message(), Michael S. Tsirkin, 2023/08/03
- [PULL 20/22] include/hw/i386/x86-iommu: Fix struct X86IOMMU_MSIMessage for big endian hosts, Michael S. Tsirkin, 2023/08/03
- [PULL 21/22] virtio-crypto: verify src&dst buffer length for sym request, Michael S. Tsirkin, 2023/08/03
- [PULL 22/22] cryptodev: Handle unexpected request to avoid crash, Michael S. Tsirkin, 2023/08/03