On Tue, 2019-06-04 at 07:03 -0400, John Ferlan wrote:
On 5/31/19 11:22 AM, Andrea Bolognani wrote:
> @@ -2489,11 +2489,16 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm)
> if (virDomainNumaGetNodeCount(vm->def->numa) <= 1 &&
> virDomainNumatuneGetMode(vm->def->numa, -1, &mem_mode) == 0
&&
> mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT) {
> + virBitmapPtr nodeset = NULL;
> +
> if (virDomainNumatuneMaybeGetNodeset(vm->def->numa,
> priv->autoNodeset,
> - &cpumapToSet,
> + &nodeset,
> -1) < 0)
> goto cleanup;
> +
> + if (virNumaNodesetToCPUset(nodeset, &cpumapToSet) < 0)
> + goto cleanup;
Coverity complained this morning because virNumaNodesetToCPUset will
allocate something into @cpumapToSet which isn't free'd when this code
jumps to cleanup.
Nice catch, Coverity!
I've just posted a fix (plus a bonus cleanup):
https://www.redhat.com/archives/libvir-list/2019-June/msg00076.html
--
Andrea Bolognani / Red Hat / Virtualization