提交 ee87e5de 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 c2fa7e7f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册