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.
This commit is contained in:
parent
da6620ffac
commit
2642a36db5
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user