[PATCH] qemu: hotplug: Rollback FD passthrough for 'slirpfd' and 'vdpafd' on hotplug failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On failure to plug the device the cleanup path didn't roll back the FD
passing to qemu thus qemu would hold the FDs indefinitely.

Resolves: https://issues.redhat.com/browse/RHEL-53964
Fixes: b79abf9c3cdab8bcecfa8769629a4cdf4bf0b6c3 (vdpafd)
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_hotplug.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 7cb1800504..75b97cf736 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1456,6 +1456,9 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
         VIR_WARN("Failed to remove network backend for netdev %s",
                  netdev_name);

+    qemuFDPassTransferMonitorRollback(netpriv->vdpafd, priv->mon);
+    qemuFDPassDirectTransferMonitorRollback(netpriv->slirpfd, priv->mon);
+
     for (n = netpriv->tapfds; n; n = n->next)
         qemuFDPassDirectTransferMonitorRollback(n->data, priv->mon);

-- 
2.46.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux