1. 05 6月, 2018 28 次提交
  2. 04 6月, 2018 1 次提交
  3. 01 6月, 2018 5 次提交
  4. 31 5月, 2018 6 次提交
    • P
      qemu: hotplug: Fix detach of disk with managed persistent reservations · 105bcdde
      Peter Krempa 提交于
      In commit 8bebb2b7 I've refactored how the detach of disk with a
      managed persistent reservations object is handled. After the commit if
      any disk with a managed PR object would be removed libvirt would also
      attempt to remove the shared 'pr-manager-helper' object potentially used
      by other disks.
      
      Thankfully this should not have practical impact as qemu should reject
      deletion of the object if it was still used and the rest of the code is
      correct.
      
      Fix this by removing the disk from the definition earlier and checking
      if the shared/managed pr-manager-helper object is still needed.
      
      This basically splits the detach code for the managed PR object from the
      unmanaged ones. The same separation will follow for the attachment code
      as well as it greatly simplifies -blockdev support for this.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      105bcdde
    • M
      testUpdateQEMUCaps: Don't leak host cpuData · 5276ec71
      Michal Privoznik 提交于
      When preparing qemuCaps for test cases the following is
      happening:
      
      qemuTestParseCapabilitiesArch() is called, which calls
      virQEMUCapsLoadCache() which in turn calls
      virQEMUCapsInitHostCPUModel() which sets qemuCaps->kvmCPU and
      qemuCaps->tcgCPU.
      
      But then the code tries to update the capabilities:
      
      testCompareXMLToArgv() calls testUpdateQEMUCaps() which calls
      virQEMUCapsInitHostCPUModel() again overwriting previously
      allocated memory. The solution is to free host cpuData in
      testUpdateQEMUCaps().
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      5276ec71
    • X
      conf: fixup USB input bus check · cc9c75f5
      Xiao Feng Ren 提交于
      This patch fixes the USB input bus check, the bug was introduced by commit 317badb2Signed-off-by: NXiao Feng Ren <renxiaof@linux.vnet.ibm.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      cc9c75f5
    • E
      audit: Enforce enum switch type cast in virDomainAuditHostdev · e0fae78a
      Erik Skultety 提交于
      There was a missing enum for mdev causing a strange 'unknown device type'
      warning when hot-plugging mdev.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1583927Signed-off-by: NErik Skultety <eskultet@redhat.com>
      e0fae78a
    • M
      qemuxml2argvtest: Don't initialize qemuCaps twice · 879cff55
      Michal Privoznik 提交于
      There's no point in calling testInitQEMUCaps() (which sets
      info.qemuCaps) only to overwrite (and leak) it on the very next
      line.
      
      ==12962== 296 (208 direct, 88 indirect) bytes in 1 blocks are definitely lost in loss record 265 of 331
      ==12962==    at 0x4C2CF26: calloc (vg_replace_malloc.c:711)
      ==12962==    by 0x5D28D9F: virAllocVar (viralloc.c:560)
      ==12962==    by 0x5D96AB4: virObjectNew (virobject.c:239)
      ==12962==    by 0x56DB7C7: virQEMUCapsNew (qemu_capabilities.c:1480)
      ==12962==    by 0x112A5B: testInitQEMUCaps (qemuxml2argvtest.c:361)
      ==12962==    by 0x1371C8: mymain (qemuxml2argvtest.c:2871)
      ==12962==    by 0x13AD0B: virTestMain (testutils.c:1120)
      ==12962==    by 0x1372FD: main (qemuxml2argvtest.c:2883)
      
      Removing the function call renders @gic argument unused therefore
      it's removed from the macro (and all its callers).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      879cff55
    • M
      virDomainDefParseXML: Free @tmp when parsing genid · 5f18b9ba
      Michal Privoznik 提交于
      We need to free return value of virXPathString().
      
      ==12962== 37 bytes in 1 blocks are definitely lost in loss record 156 of 331
      ==12962==    at 0x4C2AF0F: malloc (vg_replace_malloc.c:299)
      ==12962==    by 0x91E8439: strdup (in /lib64/libc-2.25.so)
      ==12962==    by 0x5DBD551: virStrdup (virstring.c:977)
      ==12962==    by 0x5DD3E5E: virXPathString (virxml.c:84)
      ==12962==    by 0x5E178AB: virDomainDefParseXML (domain_conf.c:19110)
      ==12962==    by 0x5E1E985: virDomainDefParseNode (domain_conf.c:20885)
      ==12962==    by 0x5E1E7CB: virDomainDefParse (domain_conf.c:20827)
      ==12962==    by 0x5E1E871: virDomainDefParseFile (domain_conf.c:20853)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5f18b9ba