Blame SOURCES/libvirt-Do-not-release-unreserved-address-in-qemuDomainAttachRNGDevice.patch

6d3351
From 595b527d46c885352dce5fd9b2e226a1d17c1ef4 Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <595b527d46c885352dce5fd9b2e226a1d17c1ef4@dist-git>
6d3351
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
6d3351
Date: Mon, 22 May 2017 10:50:56 +0200
6d3351
Subject: [PATCH] Do not release unreserved address in
6d3351
 qemuDomainAttachRNGDevice
6d3351
MIME-Version: 1.0
6d3351
Content-Type: text/plain; charset=UTF-8
6d3351
Content-Transfer-Encoding: 8bit
6d3351
6d3351
Only set releaseaddr to true after the address has been
6d3351
reserved successfully.
6d3351
6d3351
https://bugzilla.redhat.com/show_bug.cgi?id=1452581
6d3351
6d3351
Reviewed-by: John Ferlan <jferlan@redhat.com>
6d3351
(cherry picked from commit f25f30aff548636d0c8782d3eaee049c77548dd5)
6d3351
Signed-off-by: Ján Tomko <jtomko@redhat.com>
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/qemu/qemu_hotplug.c | 2 +-
6d3351
 1 file changed, 1 insertion(+), 1 deletion(-)
6d3351
6d3351
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
6d3351
index 6e5678f16..5c3660922 100644
6d3351
--- a/src/qemu/qemu_hotplug.c
6d3351
+++ b/src/qemu/qemu_hotplug.c
6d3351
@@ -2090,7 +2090,6 @@ qemuDomainAttachRNGDevice(virConnectPtr conn,
6d3351
                                             rng->source.file))
6d3351
             goto cleanup;
6d3351
     }
6d3351
-    releaseaddr = true;
6d3351
 
6d3351
     if (rng->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE ||
6d3351
         rng->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
6d3351
@@ -2103,6 +2102,7 @@ qemuDomainAttachRNGDevice(virConnectPtr conn,
6d3351
                                       !rng->info.addr.ccw.assigned) < 0)
6d3351
             goto cleanup;
6d3351
     }
6d3351
+    releaseaddr = true;
6d3351
 
6d3351
     if (qemuDomainNamespaceSetupRNG(driver, vm, rng) < 0)
6d3351
         goto cleanup;
6d3351
-- 
6d3351
2.13.0
6d3351