mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-10 13:41:35 +00:00
qemu: migration: Unlock vm on failed ACL check in protocol v2 APIs
Avoid leaving the domain locked on a failed ACL check in qemuDomainMigratePerform() and qemuDomainMigrateFinish2(). Introduced in commit abf75aea247e (Add ACL checks into the QEMU driver). (cherry picked from commit 2bdcd29c713dfedd813c89f56ae98f6f3898313d)
This commit is contained in:
parent
50c84df2c9
commit
12c35ca8e6
@ -10098,8 +10098,10 @@ qemuDomainMigratePerform(virDomainPtr dom,
|
|||||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0) {
|
||||||
|
virObjectUnlock(vm);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & VIR_MIGRATE_PEER2PEER) {
|
if (flags & VIR_MIGRATE_PEER2PEER) {
|
||||||
dconnuri = uri;
|
dconnuri = uri;
|
||||||
@ -10145,8 +10147,10 @@ qemuDomainMigrateFinish2(virConnectPtr dconn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0)
|
if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0) {
|
||||||
|
virObjectUnlock(vm);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* Do not use cookies in v2 protocol, since the cookie
|
/* Do not use cookies in v2 protocol, since the cookie
|
||||||
* length was not sufficiently large, causing failures
|
* length was not sufficiently large, causing failures
|
||||||
|
Loading…
x
Reference in New Issue
Block a user