mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: hotplug: Fix asynchronous unplug of 'shmem'
commit 5c81c342a7 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=1618622 Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
f4c39db736
commit
69c20e1090
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user