libvirt/src/util
Vincent Bernat 4d7384eb9d util: don't check for parallel iteration in hash-related functions
This is the responsability of the caller to apply the correct lock
before using these functions. Moreover, the use of a simple boolean
was still racy: two threads may check the boolean and "lock" it
simultaneously.

Users of functions from src/util/virhash.c have to be checked for
correctness. Lookups and iteration should hold a RO
lock. Modifications should hold a RW lock.

Most important uses seem to be covered. Callers have now a greater
responsability, notably the ability to execute some operations while
iterating were reliably forbidden before are now accepted.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2018-04-11 11:18:37 +02:00
..
iohelper.c iohelper: use saferead if later write with O_DIRECT 2017-10-24 10:53:18 +02:00
Makefile.inc.am util: Introduce virDevMapperGetTargets 2018-04-05 09:58:44 +02:00
viralloc.c
viralloc.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virarch.c
virarch.h
virarptable.c virarptable: fix some leaks and format issue 2018-03-17 13:19:07 +01:00
virarptable.h virarptable: Include rtnetlink.h only on Linux 2018-03-15 14:59:12 +01:00
viratomic.c
viratomic.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
viraudit.c audit: Log only an info message if audit_level < 2 and audit is not supported 2017-12-13 13:42:16 +01:00
viraudit.h audit: Log only an info message if audit_level < 2 and audit is not supported 2017-12-13 13:42:16 +01:00
virauth.c
virauth.h
virauthconfig.c
virauthconfig.h
virbitmap.c util: bitmap: Note that shrinking the bitmap requires clearing of unused bits 2018-02-05 16:08:57 +01:00
virbitmap.h util: bitmap: Use VIR_SHRINK_N in virBitmapShrink 2018-02-05 16:08:57 +01:00
virbuffer.c util: buffer: Tolerate NULL 'buf' in virBufferStrcat 2018-03-23 14:52:07 +01:00
virbuffer.h hyperv: Escape WQL queries 2017-10-16 10:29:32 -04:00
vircgroup.c virCgroupValidateMachineGroup: Don't free @machinename 2017-08-01 11:37:51 +02:00
vircgroup.h Move machineName generation from virsystemd into domain_conf 2017-07-25 17:02:27 +02:00
vircgrouppriv.h
virclosecallbacks.c util: Alter virCloseCallback typedef to return void 2018-04-09 18:26:03 -04:00
virclosecallbacks.h util: Alter virCloseCallback typedef to return void 2018-04-09 18:26:03 -04:00
vircommand.c virCommandFDIsSet: Update documentation 2018-03-22 07:44:14 +01:00
vircommand.h virCommandPassFD: Give name to flags 2018-03-22 07:44:14 +01:00
vircommandpriv.h
virconf.c util: handle missing switch enum cases 2018-02-21 16:53:44 +00:00
virconf.h maint: Replace tabs with spaces in all source files in repo 2017-10-18 13:25:10 +02:00
vircrypto.c
vircrypto.h
virdbus.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virdbus.h
virdbuspriv.h
virdevmapper.c util: Introduce virDevMapperGetTargets 2018-04-05 09:58:44 +02:00
virdevmapper.h util: Introduce virDevMapperGetTargets 2018-04-05 09:58:44 +02:00
virdnsmasq.c
virdnsmasq.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virebtables.c
virebtables.h
virendian.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virerror.c qemu: Introduce VIR_ERR_DEVICE_MISSING 2018-02-01 07:17:01 -05:00
virerror.h util: handle missing switch enum cases 2018-02-21 16:53:44 +00:00
virevent.c util: Missing 'removeTimeoutImpl' check variable inside virEventRegisterImpl() function. 2017-10-20 15:15:35 +02:00
virevent.h
vireventpoll.c
vireventpoll.h
virfcp.c
virfcp.h
virfdstream.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
virfdstream.h
virfile.c util: add virFileReadHeaderQuiet wrapper around virFileReadHeaderFD 2018-01-04 16:52:03 +01:00
virfile.h util: add virFileReadHeaderQuiet wrapper around virFileReadHeaderFD 2018-01-04 16:52:03 +01:00
virfilecache.c util: introduce virFileCache 2017-07-26 15:31:25 +02:00
virfilecache.h util: introduce virFileCache 2017-07-26 15:31:25 +02:00
virfirewall.c util: handle missing switch enum cases 2018-02-21 16:53:44 +00:00
virfirewall.h
virfirewallpriv.h
virfirmware.c
virfirmware.h
virgettext.c
virgettext.h
virgic.c
virgic.h
virhash.c util: don't check for parallel iteration in hash-related functions 2018-04-11 11:18:37 +02:00
virhash.h util: hash: Include stdbool.h in the header file 2017-08-03 09:49:15 +02:00
virhashcode.c
virhashcode.h util: hash: Make virHashCodeGen mockable 2017-08-03 09:49:15 +02:00
virhook.c
virhook.h Replace QEmu with QEMU 2018-04-01 17:42:29 +02:00
virhostcpu.c util: virhostcpu: parse frequency information on S390 2018-01-10 17:24:11 -05:00
virhostcpu.h util: introduce virHostCPUGetMicrocodeVersion 2018-01-04 16:52:03 +01:00
virhostcpupriv.h
virhostdev.c util: fix improper assignment of return value in virHostdevReadNetConfig() 2017-08-13 23:07:13 -04:00
virhostdev.h
virhostmem.c numa: avoid failure in nodememstats on non-NUMA systems 2017-11-09 17:11:51 -05:00
virhostmem.h
viridentity.c
viridentity.h
virinitctl.c
virinitctl.h
viriptables.c
viriptables.h
viriscsi.c
viriscsi.h
virjson.c util: json: Privatize struct _virJSONValue and sub-structs 2018-04-03 13:34:33 +02:00
virjson.h util: json: Privatize struct _virJSONValue and sub-structs 2018-04-03 13:34:33 +02:00
virkeycode.c keycodemapdb: Update submodule 2018-03-12 16:30:49 +01:00
virkeycode.h
virkeyfile.c
virkeyfile.h
virkmod.c
virkmod.h
virlease.c
virlease.h
virlockspace.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
virlockspace.h
virlog.c util: virlog: Introduce wildcard to log filters 2018-04-09 08:42:28 +02:00
virlog.h util: virlog: Introduce wildcard to log filters 2018-04-09 08:42:28 +02:00
virmacaddr.c conf: move 'generated' member from virMacAddr to virDomainNetDef 2018-02-19 13:15:00 -05:00
virmacaddr.h conf: move 'generated' member from virMacAddr to virDomainNetDef 2018-02-19 13:15:00 -05:00
virmacmap.c network: Move and rename networkMacMgrFileName 2017-08-16 14:17:57 -04:00
virmacmap.h network: Move and rename networkMacMgrFileName 2017-08-16 14:17:57 -04:00
virmdev.c util: mdev: Improve the error msg on non-existent mdev prior to VM start 2018-03-19 11:14:40 +01:00
virmdev.h util: mdev: Introduce virMediatedDeviceTypeReadAttrs getter 2018-01-29 15:34:30 +01:00
virnetdev.c nodedev: Fix failing to parse PCI address for non-PCI network devices 2018-01-19 09:53:01 -07:00
virnetdev.h nodedev: add switchdev to NIC capabilities 2017-09-18 08:32:24 -04:00
virnetdevbandwidth.c QoS: Set classes and filters in proper direction 2017-10-05 09:16:05 +02:00
virnetdevbandwidth.h QoS: Set classes and filters in proper direction 2017-10-05 09:16:05 +02:00
virnetdevbridge.c
virnetdevbridge.h
virnetdevip.c
virnetdevip.h
virnetdevmacvlan.c util: restructure virNetDevReadNetConfig() to eliminate false error logs 2017-08-11 19:09:49 -04:00
virnetdevmacvlan.h
virnetdevmidonet.c
virnetdevmidonet.h
virnetdevopenvswitch.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virnetdevopenvswitch.h
virnetdevtap.c virNetDevTapInterfaceStats: Allow caller to not swap the statistics 2017-10-05 09:16:05 +02:00
virnetdevtap.h virNetDevTapInterfaceStats: Allow caller to not swap the statistics 2017-10-05 09:16:05 +02:00
virnetdevveth.c
virnetdevveth.h
virnetdevvlan.c
virnetdevvlan.h
virnetdevvportprofile.c util: handle missing switch enum cases 2018-02-21 16:53:44 +00:00
virnetdevvportprofile.h util: handle missing switch enum cases 2018-02-21 16:53:44 +00:00
virnetlink.c virNetlinkDumpCommand: Don't leak response buffer 2018-03-19 10:47:08 +01:00
virnetlink.h util: introduce virNetlinkGetNeighbor to get neighbor table entry 2018-03-15 11:22:42 +01:00
virnodesuspend.c
virnodesuspend.h
virnuma.c
virnuma.h
virobject.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virobject.h util: Introduce and use virObjectRWUnlock 2017-08-14 21:41:59 -04:00
virpci.c build: Fix broken build on FreeBSD and OSX after recent nodedev series 2018-01-29 17:53:13 +01:00
virpci.h util: pci: Introduce virPCIGetMdevTypes helper 2018-01-29 15:34:30 +01:00
virperf.c
virperf.h
virpidfile.c
virpidfile.h
virpolkit.c Merge WITH_POLKIT1 and WITH_POLKIT 2018-03-14 12:46:26 +01:00
virpolkit.h
virportallocator.c port allocator: make port range constant object 2018-02-22 13:52:45 +01:00
virportallocator.h port allocator: make port range constant object 2018-02-22 13:52:45 +01:00
virprobe.h util: probe: Add quiet versions of the "PROBE" macro 2018-01-03 15:21:06 +01:00
virprocess.c
virprocess.h
virqemu.c util: qemu: Don't access virJSONValue directly in virQEMUBuildCommandLineJSONRecurse 2018-04-03 13:34:33 +02:00
virqemu.h
virrandom.c
virrandom.h
virresctrl.c util: bitmap: Use VIR_SHRINK_N in virBitmapShrink 2018-02-05 16:08:57 +01:00
virresctrl.h util: Extract path formatting into virResctrlAllocDeterminePath 2018-01-31 14:51:34 +01:00
virresctrlpriv.h resctrl: Add functions to work with resctrl allocations 2018-01-25 17:16:08 +01:00
virrotatingfile.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
virrotatingfile.h
virscsi.c
virscsi.h
virscsihost.c
virscsihost.h
virscsivhost.c util: Report error if vhost-scsi device file cannot be found 2017-12-13 15:37:30 -05:00
virscsivhost.h
virseclabel.c
virseclabel.h
virsecret.c util: Move virSecretUsageType to virsecret.h 2017-09-21 15:46:48 -04:00
virsecret.h util: Move virSecretUsageType to virsecret.h 2017-09-21 15:46:48 -04:00
virsexpr.c
virsexpr.h
virsocketaddr.c util: fix spelling in virSocketAddrParseAny docs 2018-04-05 14:57:16 -06:00
virsocketaddr.h util: introduce virSocketAddrParseAny 2018-04-05 14:50:15 -06:00
virstorageencryption.c util: storage: Sanitize parsing of disk encryption XMLs 2018-03-08 14:29:50 +01:00
virstorageencryption.h util: storage: Sanitize parsing of disk encryption XMLs 2018-03-08 14:29:50 +01:00
virstoragefile.c util: storage: Sanitize parsing of disk auth XMLs 2018-03-08 14:29:49 +01:00
virstoragefile.h util: storage: Sanitize parsing of disk auth XMLs 2018-03-08 14:29:49 +01:00
virstoragefilebackend.c storage: move storage file backend framework into util directory 2018-02-09 11:05:10 +00:00
virstoragefilebackend.h storage: move storage file backend framework into util directory 2018-02-09 11:05:10 +00:00
virstring.c util: Introduce virStringListMerge 2018-01-11 18:53:04 +01:00
virstring.h util: Introduce virStringListMerge 2018-01-11 18:53:04 +01:00
virsysinfo.c virsysinfo: Use more virSkipSpacesBackwards() 2018-03-14 17:43:40 +01:00
virsysinfo.h conf: Add support for setting Chassis SMBIOS data fields 2018-02-17 07:36:46 -05:00
virsysinfopriv.h
virsystemd.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virsystemd.h Move machineName generation from virsystemd into domain_conf 2017-07-25 17:02:27 +02:00
virsystemdpriv.h
virthread.c util: gettid() is Linux-specific 2017-12-05 11:28:19 +01:00
virthread.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virthreadjob.c
virthreadjob.h
virthreadpool.c
virthreadpool.h
virtime.c
virtime.h
virtpm.c tpm: Use /dev/null for cancel path if none was found 2017-09-07 14:00:46 +02:00
virtpm.h
virtypedparam.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virtypedparam.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
viruri.c
viruri.h
virusb.c virUSBDeviceNew: Construct vroot path properly 2018-01-31 17:10:01 +01:00
virusb.h
virutil.c util: use union for sockaddr structs to avoid aliasing 2018-01-31 17:33:08 +00:00
virutil.h util: add virGetUNIXSocketPath helper 2018-01-31 15:12:53 +00:00
viruuid.c
viruuid.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virvhba.c
virvhba.h
virxdrdefs.h
virxml.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virxml.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00