mirror of https://gitee.com/openkylin/libvirt.git
qemu: sev: Don't jump to endjob if SEV measurement retrieval fails
If measurement retrieval fails we'd forget to call ExitMonitor to unlock the monitor. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reported-by: Luyao Huang <lhuang@redhat.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
This commit is contained in:
parent
54c54b56f4
commit
6d490ed0d8
|
@ -21520,12 +21520,13 @@ qemuDomainGetSEVMeasurement(virQEMUDriverPtr driver,
|
|||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
tmp = qemuMonitorGetSEVMeasurement(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
||||
if (tmp == NULL)
|
||||
goto endjob;
|
||||
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!tmp)
|
||||
goto endjob;
|
||||
|
||||
if (virTypedParamsAddString(params, nparams, &maxpar,
|
||||
VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENT,
|
||||
tmp) < 0)
|
||||
|
|
Loading…
Reference in New Issue