mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 13:35:17 +00:00
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. (cherry picked from commit 3b56425938e2f97208d5918263efa0d6439e4ecd)
This commit is contained in:
parent
939b0818c2
commit
82daa87f6a
@ -14849,12 +14849,6 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
device = qemuDiskPathToAlias(vm, disk, NULL);
|
|
||||||
|
|
||||||
if (!device) {
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
|
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -14862,6 +14856,11 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
|||||||
&persistentDef) < 0)
|
&persistentDef) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
|
device = qemuDiskPathToAlias(vm, disk, NULL);
|
||||||
|
if (!device) {
|
||||||
|
goto endjob;
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
||||||
priv = vm->privateData;
|
priv = vm->privateData;
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user