Re: [libvirt] [PATCH v2 06/12] qemuDomainDetachWatchdog: Don't release watchdog address twice

2018-05-26 Thread Ján Tomko

On Thu, May 24, 2018 at 01:13:33PM +0200, Michal Privoznik wrote:

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 
---
src/qemu/qemu_hotplug.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)



Reviewed-by: Ján Tomko 

Jano


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2 06/12] qemuDomainDetachWatchdog: Don't release watchdog address twice

2018-05-24 Thread Michal Privoznik
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 
---
 src/qemu/qemu_hotplug.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index dba4bc9a6e..0062e27a3b 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -5344,10 +5344,8 @@ qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
 ret = -1;
 
 if (ret == 0) {
-if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1) {
-qemuDomainReleaseDeviceAddress(vm, >info, NULL);
+if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1)
 ret = qemuDomainRemoveWatchdog(driver, vm, watchdog);
-}
 }
 qemuDomainResetDeviceRemoval(vm);
 
-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list