mirror of https://gitee.com/openkylin/libvirt.git
qemu: Fix job usage in virDomainGetBlockIoTune
CVE-2013-6458 Every API that is going to begin a job should do that before fetching data from vm->def.
This commit is contained in:
parent
ff5f30b6bf
commit
3b56425938
|
@ -15064,12 +15064,6 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
device = qemuDiskPathToAlias(vm, disk, NULL);
|
||||
|
||||
if (!device) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -15077,6 +15071,11 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
|||
&persistentDef) < 0)
|
||||
goto endjob;
|
||||
|
||||
device = qemuDiskPathToAlias(vm, disk, NULL);
|
||||
if (!device) {
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
||||
priv = vm->privateData;
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
|
Loading…
Reference in New Issue