mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
tmp = qemuMonitorGetSEVMeasurement(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
tmp = qemuMonitorGetSEVMeasurement(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
||||||
if (tmp == NULL)
|
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
|
if (!tmp)
|
||||||
|
goto endjob;
|
||||||
|
|
||||||
if (virTypedParamsAddString(params, nparams, &maxpar,
|
if (virTypedParamsAddString(params, nparams, &maxpar,
|
||||||
VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENT,
|
VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENT,
|
||||||
tmp) < 0)
|
tmp) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user