|
|
9119d9 |
From aeeb94885f4ba16eef7694b561341d2b9959bb2a Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <aeeb94885f4ba16eef7694b561341d2b9959bb2a@dist-git>
|
|
|
9119d9 |
From: John Ferlan <jferlan@redhat.com>
|
|
|
9119d9 |
Date: Tue, 28 Oct 2014 22:28:44 -0400
|
|
|
9119d9 |
Subject: [PATCH] hotplug: Check for alias in controller detach
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1141621
|
|
|
9119d9 |
|
|
|
9119d9 |
In qemuDomainDetachControllerDevice if the info.alias already exists
|
|
|
9119d9 |
a call to qemuAssignDeviceControllerAlias would overwrite the existing
|
|
|
9119d9 |
so avoid this possibility.
|
|
|
9119d9 |
|
|
|
9119d9 |
(cherry picked from commit 65be7572d2ef0228b111c2a1bbc90ee95179b706)
|
|
|
9119d9 |
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_hotplug.c | 3 ++-
|
|
|
9119d9 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
|
|
|
9119d9 |
index e5e5180..e7aa2f0 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_hotplug.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_hotplug.c
|
|
|
9119d9 |
@@ -3236,7 +3236,8 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
|
|
|
9119d9 |
goto cleanup;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
- if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
|
|
|
9119d9 |
+ if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
|
|
|
9119d9 |
+ !detach->info.alias) {
|
|
|
9119d9 |
if (qemuAssignDeviceControllerAlias(detach) < 0)
|
|
|
9119d9 |
goto cleanup;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.3
|
|
|
9119d9 |
|