提交 2642a36d 编写于 作者: P Peter Krempa

qemu: qemuDomainSetVcpusAgent: re-check agent before calling it the again

With a very unfortunate timing, the agent might vanish before we do the
second call while the locks were down. Re-check that the agent is
available before attempting it again.
上级 da6620ff
...@@ -4881,6 +4881,9 @@ qemuDomainSetVcpusAgent(virDomainObjPtr vm, ...@@ -4881,6 +4881,9 @@ qemuDomainSetVcpusAgent(virDomainObjPtr vm,
if (qemuAgentUpdateCPUInfo(nvcpus, cpuinfo, ncpuinfo) < 0) if (qemuAgentUpdateCPUInfo(nvcpus, cpuinfo, ncpuinfo) < 0)
goto cleanup; goto cleanup;
if (!qemuDomainAgentAvailable(vm, true))
goto cleanup;
qemuDomainObjEnterAgent(vm); qemuDomainObjEnterAgent(vm);
ret = qemuAgentSetVCPUs(qemuDomainGetAgent(vm), cpuinfo, ncpuinfo); ret = qemuAgentSetVCPUs(qemuDomainGetAgent(vm), cpuinfo, ncpuinfo);
qemuDomainObjExitAgent(vm); qemuDomainObjExitAgent(vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册