]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Protect access to libxlLogger files hash table
authorJim Fehlig <jfehlig@suse.com>
Thu, 18 Nov 2021 19:03:20 +0000 (12:03 -0700)
committerJim Fehlig <jfehlig@suse.com>
Thu, 2 Dec 2021 18:34:49 +0000 (11:34 -0700)
commita7a03324d86e111f81687b5315b8f296dde84340
tree77709f4300e0154bca871d1c3c5546dbed8801d9
parent5c5df5310f72be4878a71ace47074c54e0d1a27d
libxl: Protect access to libxlLogger files hash table

The hash table of log file objects in libxlLogger is not protected against
concurrent access. It is possible for one thread to remove an entry while
another is updating it. Add a mutex to the libxlLogger object and lock it
when accessing the files hash table.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libxl/libxl_logger.c