1. 05 9月, 2018 3 次提交
    • M
      lock_daemon: Fix some memleaks · 676b35ce
      Michal Privoznik 提交于
      28 bytes in 1 blocks are definitely lost in loss record 26 of 66
         at 0x4C2CF0F: malloc (vg_replace_malloc.c:299)
         by 0x7A02719: strdup (strdup.c:42)
         by 0x197DC1: virStrdup (virstring.c:961)
         by 0x12B478: virLockDaemonConfigFilePath (lock_daemon_config.c:44)
         by 0x12A759: main (lock_daemon.c:1270)
      
      62 (32 direct, 30 indirect) bytes in 1 blocks are definitely lost in loss record 41 of 66
         at 0x4C2EF26: calloc (vg_replace_malloc.c:711)
         by 0x151B61: virAlloc (viralloc.c:144)
         by 0x12B56C: virLockDaemonConfigNew (lock_daemon_config.c:71)
         by 0x12A491: main (lock_daemon.c:1262)
      
      13 bytes in 1 blocks are definitely lost in loss record 21 of 70
         at 0x4C2CF0F: malloc (vg_replace_malloc.c:299)
         by 0x7A02719: strdup (strdup.c:42)
         by 0x197E3F: virStrdup (virstring.c:961)
         by 0x12C86B: virLockSpaceProtocolDispatchRegister (lock_daemon_dispatch.c:291)
         by 0x12BB73: virLockSpaceProtocolDispatchRegisterHelper (lock_daemon_dispatch_stubs.h:152)
         by 0x1336AA: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
         by 0x13320D: virNetServerProgramDispatch (virnetserverprogram.c:304)
         by 0x139E3E: virNetServerProcessMsg (virnetserver.c:144)
         by 0x13A1A2: virNetServerDispatchNewMessage (virnetserver.c:230)
         by 0x1350F5: virNetServerClientDispatchMessage (virnetserverclient.c:343)
         by 0x137680: virNetServerClientDispatchEvent (virnetserverclient.c:1498)
         by 0x147704: virNetSocketEventHandle (virnetsocket.c:2140)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      676b35ce
    • M
      virSecurityManagerNewStack: Don't ignore virSecurityStackAddNested retval · 549ac3d1
      Michal Privoznik 提交于
      The virSecurityStackAddNested() can fail in which case
      virSecurityManagerNewStack() should fail too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      549ac3d1
    • M
      virSecurityManagerNewDriver: Fix code pattern · c060e400
      Michal Privoznik 提交于
      Use 'error' label to free allocated memory.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      c060e400
  2. 04 9月, 2018 29 次提交
  3. 03 9月, 2018 1 次提交
  4. 01 9月, 2018 1 次提交
  5. 31 8月, 2018 1 次提交
  6. 30 8月, 2018 1 次提交
  7. 29 8月, 2018 4 次提交
    • L
      qemu: Validate memory access during validate domain config · fe67e3e2
      Luyao Huang 提交于
      Commit 6534b3c4 tried to raise an error when there is no numa
      nodes by setting access='shared' in the domain config, but added
      a helper called from qemuDomainDeviceDefValidate instead of a
      helper called from qemuDomainDefValidate for XML:
      
        <memoryBacking>
          <hugepages/>
          <access mode='shared'/>
        </memoryBacking>
      
      Since there are no memory devices in the test XML, there would
      be no validation failure, but the test added was still failing.
      Investigating that it turns out that unnecessary XML elements
      were causing the failure (no need for <video>, <graphics>,
      <pm>, usb controller model "piix3-uhci", disk attribute for
      "discard='unmap'", <serial>, <console>, <channel> and a
      memballoon model). Removing all those before moving the method
      caused the test to succeed.
      
      So this patch moves the validation to the right place and
      removes all the unnecessary XML pieces that were causing
      a false validation failure.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1448149#c14Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fe67e3e2
    • S
      vsh-table: Fix broken build on centos and rhel · 2853a53f
      Simon Kobyda 提交于
      The reason of broken build was that centos and rhel use older version of
      glibc. These versions of glibc on these platforms cannot work with newer
      unicodes, thus causing functions iswprint() and wcwidth() return
      unexpected values causing the vshtabletest to fail. Therefore, let's
      replace the new unicode characters causing issues with some older ones
      to fix the test suite, as the issue would still persist during runtime.
      Signed-off-by: NSimon Kobyda <skobyda@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      2853a53f
    • M
      virDomainObjListAddLocked: fix double free · 7e760f61
      Marc Hartmayer 提交于
      If @vm has flagged as "to be removed" virDomainObjListFindByNameLocked
      returns NULL (although the definition actually exists). Therefore, the
      possibility exits that "virHashAddEntry" will raise the error
      "Duplicate key" => virDomainObjListAddObjLocked fails =>
      virDomainObjEndAPI(&vm) is called and this leads to a freeing of @def
      since @def is already assigned to vm->def. But actually this leads to
      a double free since the common usage pattern is that the caller of
      virDomainObjListAdd(Locked) is responsible for freeing @def in case of
      an error.
      
      Let's fix this by setting vm->def to NULL in case of an error.
      
      Backtrace:
      
         ➤  bt
         #0  virFree (ptrptr=0x7575757575757575)
         #1  0x000003ffb5b25b3e in virDomainResourceDefFree
         #2  0x000003ffb5b37c34 in virDomainDefFree
         #3  0x000003ff9123f734 in qemuDomainDefineXMLFlags
         #4  0x000003ff9123f7f4 in qemuDomainDefineXML
         #5  0x000003ffb5cd2c84 in virDomainDefineXML
         #6  0x000000011745aa82 in remoteDispatchDomainDefineXML
         ...
      Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com>
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
      7e760f61
    • A
      qemu: Add more defaults for RISC-V virt guests · 6c5f6cda
      Andrea Bolognani 提交于
      We would have used virtio for networking anyway, but it's
      better to be explicit; for graphics, none of the existing
      models work right now but virtio is the only one which
      has a non-PCI variant, so it's as good a default as any
      Spotted-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      6c5f6cda