mirror of https://gitee.com/openkylin/libvirt.git
conf: disallow empty cpusets for vcpu pinning when parsing XML
They are disallowed in the pinning API and as default cpuset. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1293241
This commit is contained in:
parent
414b7eeae9
commit
31b782a147
|
@ -14163,6 +14163,12 @@ virDomainVcpuPinDefParseXML(xmlNodePtr node,
|
|||
if (virBitmapParse(tmp, 0, &def->cpumask, VIR_DOMAIN_CPUMASK_LEN) < 0)
|
||||
goto error;
|
||||
|
||||
if (virBitmapIsAllClear(def->cpumask)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Invalid value of 'cpuset': %s"), tmp);
|
||||
goto error;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(tmp);
|
||||
ctxt->node = oldnode;
|
||||
|
|
Loading…
Reference in New Issue