mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
qemuDomainDetachWatchdog: Don't release watchdog address twice
On watchdog unplug, when qemu doesn't support DEVICE_DELETED event (or couple of other reasons) we do two things: 1) release watchdog device address, 2) call qemuDomainRemoveWatchdog() which does 1) again. This is potentially dangerous. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c2fa7e7ffc
commit
ee87e5de36
@ -5344,10 +5344,8 @@ qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
|
||||
ret = -1;
|
||||
|
||||
if (ret == 0) {
|
||||
if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1) {
|
||||
qemuDomainReleaseDeviceAddress(vm, &watchdog->info, NULL);
|
||||
if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1)
|
||||
ret = qemuDomainRemoveWatchdog(driver, vm, watchdog);
|
||||
}
|
||||
}
|
||||
qemuDomainResetDeviceRemoval(vm);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user