Blob Blame History Raw
From b25d3689c715af6f7d39194d273fb5ebcb0dccc2 Mon Sep 17 00:00:00 2001
Message-Id: <b25d3689c715af6f7d39194d273fb5ebcb0dccc2@dist-git>
From: John Ferlan <jferlan@redhat.com>
Date: Tue, 28 Oct 2014 22:28:49 -0400
Subject: [PATCH] qemu-attach: Assign device aliases

https://bugzilla.redhat.com/show_bug.cgi?id=1141621

As part of attach processing, assign the device aliases by calling
qemuAssignDeviceAliases during qemuDomainQemuAttach once all the devices
are found after the qemuParseCommandLinePid processing.

This will alleviate a symptom that caused a libvirtd crash during an
attempted device detach.

(cherry picked from commit e3a52afcfcc3478b553dca38140394fd93f90a2c)
Signed-off-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_driver.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 88a1895..c158f64 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14793,6 +14793,9 @@ static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn,
     if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
         goto cleanup;
 
+    if (qemuAssignDeviceAliases(def, qemuCaps) < 0)
+        goto cleanup;
+
     if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0)
         goto cleanup;
 
-- 
2.1.3