提交 69c20e10 编写于 作者: P Peter Krempa

qemu: hotplug: Fix asynchronous unplug of 'shmem'

commit 5c81c342 forgot to skip the detaching of the shmem backend
when async unplug is requested which meant that we've tried to unplug
the backend prior to delivery of the DEVICE_DELETED event.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1618622Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 f4c39db7
......@@ -5479,11 +5479,16 @@ qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
if (qemuDomainObjExitMonitor(driver, vm) < 0)
goto cleanup;
if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1)
ret = qemuDomainRemoveShmemDevice(driver, vm, shmem);
if (async) {
ret = 0;
} else {
if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1)
ret = qemuDomainRemoveShmemDevice(driver, vm, shmem);
}
cleanup:
qemuDomainResetDeviceRemoval(vm);
if (!async)
qemuDomainResetDeviceRemoval(vm);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册