提交 12c35ca8 编写于 作者: P Peter Krempa 提交者: Eric Blake

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 abf75aea (Add ACL checks into the QEMU driver).

(cherry picked from commit 2bdcd29c)
上级 50c84df2
......@@ -10098,8 +10098,10 @@ qemuDomainMigratePerform(virDomainPtr dom,
if (!(vm = qemuDomObjFromDomain(dom)))
goto cleanup;
if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0)
if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0) {
virObjectUnlock(vm);
goto cleanup;
}
if (flags & VIR_MIGRATE_PEER2PEER) {
dconnuri = uri;
......@@ -10145,8 +10147,10 @@ qemuDomainMigrateFinish2(virConnectPtr dconn,
goto cleanup;
}
if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0)
if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0) {
virObjectUnlock(vm);
goto cleanup;
}
/* Do not use cookies in v2 protocol, since the cookie
* length was not sufficiently large, causing failures
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册