libvirt/src/conf
Michal Privoznik 2752a67826 virDomainNumaFillCPUsInNode: Skip over NUMA nodes without vCPUs
After v6.5.0-rc1~148 we started to rectify vCPU to guest NUMA
assignment - if there is a vCPU not assigned to any guest NUMA
node it is automatically assigned to node #0.

A month later I've made it possible to define guest NUMA nodes
without vCPUs (v6.6.0-rc1~250) - this is needed because of HMAT.
As a part of that I fixed all callers of
virDomainNumaGetNodeCpumask() (which returns a bitmap of vCPUs for
given node) to handle case when NULL is returned (i.e. no vCPUs
assigned to given node). But of course my patch was written
before aforementioned vCPU rectify patch but merged afterwards
and hence I missed the virDomainNumaFillCPUsInNode() caller.

And because we are dealing with a NULL pointer, of course this
leads to a crash. Just try to define a domain with at least two
NUMA nodes and no vCPU assignment to any of the nodes.

Fixes: a26f61ee0c
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1880289
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-10-01 10:36:17 +02:00
..
backup_conf.c virStorageSourceNew: Abort on failure 2020-09-23 22:37:56 +02:00
backup_conf.h backup: Allow configuring incremental backup per-disk individually 2020-07-08 08:40:30 +02:00
capabilities.c conf: eliminate unnecessary labels 2020-07-08 16:35:36 -04:00
capabilities.h Add a space before ending a comment 2020-01-30 12:32:03 +01:00
checkpoint_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
checkpoint_conf.h conf: checkpoint: Add a flag storing whether disk 'size' is valid 2020-07-07 12:58:19 +02:00
cpu_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
cpu_conf.h conf: Introduce migratable attribute for the <cpu> element 2020-06-09 20:32:50 +02:00
device_conf.c virDomainNetFindIdx: add support for CCW addresses 2020-09-24 13:48:31 +02:00
device_conf.h virDomainNetFindIdx: add support for CCW addresses 2020-09-24 13:48:31 +02:00
domain_addr.c virDomainCCWAddressAssign: Drop spurious space at end of error message 2020-09-23 22:45:45 +02:00
domain_addr.h node_device: mdev vfio-ccw support 2020-09-15 09:06:32 +02:00
domain_audit.c conf, qemu, security, tests: introducing 'def->tpms' array 2020-06-23 17:27:50 +02:00
domain_audit.h
domain_capabilities.c conf: allow to map sound device to host device 2020-08-25 08:42:16 +04:00
domain_capabilities.h conf: Advertise migratable attribute for CPU in domcaps 2020-06-09 20:32:50 +02:00
domain_conf.c virDomainNetFindIdx: add support for CCW addresses 2020-09-24 13:48:31 +02:00
domain_conf.h conf, qemu: move qemuDomainNVDimmAlignSizePseries to domain_conf.c 2020-09-23 13:19:47 -03:00
domain_event.c check for NULL before calling g_regex_unref 2020-09-08 16:07:47 +02:00
domain_event.h
domain_nwfilter.c
domain_nwfilter.h
interface_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
interface_conf.h Remove virutil.h from all header files 2020-02-24 23:15:50 +01:00
meson.build meson: src: build libvirt.so library 2020-08-03 09:27:04 +02:00
moment_conf.c
moment_conf.h
netdev_bandwidth_conf.c conf: do not pass vm object to virDomainClearNetBandwidth 2020-02-25 17:50:47 +01:00
netdev_bandwidth_conf.h conf: do not pass vm object to virDomainClearNetBandwidth 2020-02-25 17:50:47 +01:00
netdev_vlan_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
netdev_vlan_conf.h
netdev_vport_profile_conf.c
netdev_vport_profile_conf.h
network_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
network_conf.h conf: convert network_conf.c to use g_auto* pointers 2020-06-15 16:02:16 -04:00
network_event.c
network_event.h
networkcommon_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
networkcommon_conf.h
node_device_conf.c node_device: detect CSS devices 2020-09-15 09:06:15 +02:00
node_device_conf.h virsh: nodedev: ability to filter CSS capabilities 2020-09-15 09:06:24 +02:00
node_device_event.c
node_device_event.h
node_device_util.c virsh: include virutil.h where used 2020-02-24 23:15:50 +01:00
node_device_util.h
numa_conf.c virDomainNumaFillCPUsInNode: Skip over NUMA nodes without vCPUs 2020-10-01 10:36:17 +02:00
numa_conf.h numa: expose HMAT APIs 2020-07-08 12:05:24 +02:00
nwfilter_conf.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
nwfilter_conf.h
nwfilter_ipaddrmap.c
nwfilter_ipaddrmap.h
nwfilter_params.c conf: Remove superfluous breaks 2020-07-21 15:53:15 +02:00
nwfilter_params.h
object_event_private.h conf: fix alignment in virObjectEvent to be 8 not 4 bytes 2020-06-04 11:17:05 +01:00
object_event.c
object_event.h
secret_conf.c conf: eliminate unnecessary labels 2020-07-08 16:35:36 -04:00
secret_conf.h Remove virutil.h from all header files 2020-02-24 23:15:50 +01:00
secret_event.c
secret_event.h
snapshot_conf_priv.h virDomainSnapshotDiskDefFree: Export and register as autoptr func 2020-10-01 09:55:02 +02:00
snapshot_conf.c virDomainSnapshotAlignDisks: refactor extension to all disks 2020-09-23 22:39:24 +02:00
snapshot_conf.h virDomainSnapshotDiskDefFree: Export and register as autoptr func 2020-10-01 09:55:02 +02:00
storage_adapter_conf.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
storage_adapter_conf.h
storage_capabilities.c conf: use g_auto() for all virBuffers 2020-07-08 16:34:17 -04:00
storage_capabilities.h
storage_conf.c virStorageVolDefParseXML: Use g_steal_pointer 2020-09-23 22:37:56 +02:00
storage_conf.h conf: add control over COW for storage pool directories 2020-07-23 16:18:09 +01:00
storage_event.c
storage_event.h
virchrdev.c Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
virchrdev.h
virconftypes.h conf: allow to map sound device to host device 2020-08-25 08:42:16 +04:00
virdomaincheckpointobjlist.c src: replace verify(expr) with G_STATIC_ASSERT(expr) 2020-01-17 10:02:01 +00:00
virdomaincheckpointobjlist.h
virdomainmomentobjlist.c
virdomainmomentobjlist.h
virdomainobjlist.c
virdomainobjlist.h
virdomainsnapshotobjlist.c
virdomainsnapshotobjlist.h
virinterfaceobj.c
virinterfaceobj.h
virnetworkobj.c conf: eliminate unnecessary labels 2020-07-08 16:35:36 -04:00
virnetworkobj.h
virnetworkportdef.c conf: use g_auto() for all virBuffers 2020-07-08 16:34:17 -04:00
virnetworkportdef.h conf: reduce includes in virnetworkportdef.h 2020-02-25 17:50:47 +01:00
virnodedeviceobj.c virsh: nodedev: ability to filter CSS capabilities 2020-09-15 09:06:24 +02:00
virnodedeviceobj.h nodedev: add mdev support to virNodeDeviceCreateXML() 2020-06-19 10:39:55 +02:00
virnwfilterbindingdef.c conf: use g_auto() for all virBuffers 2020-07-08 16:34:17 -04:00
virnwfilterbindingdef.h conf: virnwfilterbindingdef: include virxml.h 2020-02-25 17:46:45 +01:00
virnwfilterbindingobj.c conf: use g_auto() for all virBuffers 2020-07-08 16:34:17 -04:00
virnwfilterbindingobj.h
virnwfilterbindingobjlist.c
virnwfilterbindingobjlist.h
virnwfilterobj.c
virnwfilterobj.h
virsavecookie.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
virsavecookie.h
virsecretobj.c
virsecretobj.h
virstorageobj.c Move declarations before statements 2020-08-25 19:03:11 +02:00
virstorageobj.h