[libvirt] [PATCH 07/11] Fix vm usage after ExitMonitor in DetachDevice
Michal Privoznik
mprivozn at redhat.com
Wed Dec 17 12:19:01 UTC 2014
On 16.12.2014 17:41, Ján Tomko wrote:
> If the domain died and was cleaned up by qemuProcessStop,
> we don't need to do the cleanup (and vm->def might have been
> relpaced).
> ---
> src/qemu/qemu_hotplug.c | 54 ++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 36 insertions(+), 18 deletions(-)
>
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index 94bc4a2..b45342d 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -3033,19 +3033,22 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
> qemuDomainObjEnterMonitor(driver, vm);
> if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
> if (qemuMonitorDelDevice(priv->mon, detach->info.alias) < 0) {
> - qemuDomainObjExitMonitor(driver, vm);
> + if (qemuDomainObjExitMonitorAlive(driver, vm) < 0)
> + goto cleanup;
> virDomainAuditDisk(vm, detach->src, NULL, "detach", false);
Other than the audit issue, this looks okay. Weak ACK until the time we
have a consensus on the audit.
Michal
More information about the libvir-list
mailing list