From: Jiri Denemark Date: Wed, 17 Oct 2012 12:08:17 +0000 (+0200) Subject: qemu: Clear async job when p2p migration fails early X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=837993d845a32bb222959a84d1c03a0c47f785be;p=libvirt.git qemu: Clear async job when p2p migration fails early When p2p migration fails early because qemuMigrationIsAllowed or qemuMigrationIsSafe say migration should be cancelled, we fail to clear the migration-out async job. As a result of that, further APIs called for the same domain may fail with Timed out during operation: cannot acquire state change lock. Reported by Guido Winkelmann. --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 68d614d0e9..65cd6ec5ea 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2641,10 +2641,10 @@ qemuMigrationPerformJob(struct qemud_driver *driver, } if (!qemuMigrationIsAllowed(driver, vm, NULL)) - goto cleanup; + goto endjob; if (!(flags & VIR_MIGRATE_UNSAFE) && !qemuMigrationIsSafe(vm->def)) - goto cleanup; + goto endjob; resume = virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING;