[PATCH 0/3] qemu_capabilities: Reword domain caps cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's fairly easy to reproduce the bug (see its description in 3/3). Just
put a sleep here:

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index b62dd1df52..eeae967420 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1399,6 +1399,7 @@ virQEMUDriverGetDomainCapabilities(virQEMUDriverPtr driver,
         key = g_strdup_printf("%d:%d:%s:%s", data.arch, data.virttype,
                               NULLSTR(data.machine), NULLSTR(data.path));
 
+        sleep(5);
         if (virHashAddEntry(domCapsCache, key, domCaps) < 0)
             return NULL;
     }



And then try to get domcaps from two consoles at once:

  virsh domcapabilities

One will succeed, the other will fail with an error.

Michal Prívozník (3):
  cpu.c: Check properly for virCapabilitiesGetNodeInfo() retval
  qemu_conf: Avoid dereferencing NULL in
    virQEMUDriverGetHost{NUMACaps,CPU}
  qemu_capabilities: Reword domain caps cache

 src/cpu/cpu.c                |   2 +-
 src/qemu/qemu_capabilities.c | 118 +++++++++++++++++++++++++++++++++--
 src/qemu/qemu_capabilities.h |  14 ++++-
 src/qemu/qemu_conf.c         |  86 +++++++++----------------
 4 files changed, 155 insertions(+), 65 deletions(-)

-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux