mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Revert "libxl: Fix possible invalid read"
This reverts commit 394d6e0a95ac91facba06ab43d67ae8600b14b0e. The real problem is accessing the virtBitmap structure as a byte array, which was correctly identified and fixed by Jeremy Fitzhardinge https://www.redhat.com/archives/libvir-list/2013-October/msg01257.html
This commit is contained in:
parent
a52fa5569a
commit
835f992a68
@ -454,7 +454,6 @@ libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
|
||||
size_t cpumaplen;
|
||||
int vcpu;
|
||||
size_t i;
|
||||
size_t limit;
|
||||
int ret = -1;
|
||||
|
||||
if (libxlDoNodeGetInfo(driver, &nodeinfo) < 0)
|
||||
@ -471,8 +470,7 @@ libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
|
||||
|
||||
cpumask = (uint8_t*) def->cputune.vcpupin[vcpu]->cpumask;
|
||||
|
||||
limit = MIN(VIR_DOMAIN_CPUMASK_LEN, cpumaplen);
|
||||
for (i = 0; i < limit; ++i) {
|
||||
for (i = 0; i < VIR_DOMAIN_CPUMASK_LEN; ++i) {
|
||||
if (cpumask[i])
|
||||
VIR_USE_CPU(cpumap, i);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user