1. 16 3月, 2015 4 次提交
  2. 15 3月, 2015 3 次提交
    • E
      network: avoid memory leak of dnsmasq capabilities · eea08abe
      Eric Blake 提交于
      Valgrind detected a leak:
      
      ==17820== 102 (56 direct, 46 indirect) bytes in 1 blocks are definitely lost in loss record 479 of 646
      ==17820==    at 0x4A08946: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==17820==    by 0x508521A: virAllocVar (viralloc.c:560)
      ==17820==    by 0x50D9FCA: virObjectNew (virobject.c:193)
      ==17820==    by 0x50A4FD9: dnsmasqCapsNewEmpty (virdnsmasq.c:784)
      ==17820==    by 0x50A514E: dnsmasqCapsNewFromBinary (virdnsmasq.c:830)
      ==17820==    by 0x1B508287: networkStateInitialize (bridge_driver.c:666)
      
      It looks like commit 172acef4 introduced the problem, because
      networkGetDnsmasqCaps() increments the reference count but an
      early exit never does a matching decrement.
      
      * src/network/bridge_driver.c (networkStateCleanup): Plug leak.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eea08abe
    • E
      netdev: silence valgrind warning about ioctl use · a9abc08d
      Eric Blake 提交于
      Valgrind complained:
      
      ==3770== Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s)
      ==3770==    at 0x919D407: ioctl (syscall-template.S:81)
      ==3770==    by 0x530FE7E: rpl_ioctl (ioctl.c:42)
      ==3770==    by 0x50CB433: virNetDevFeatureAvailable (virnetdev.c:2764)
      ==3770==    by 0x50CB6A7: virNetDevGetFeatures (virnetdev.c:2830)
      ==3770==    by 0x1F0E5347: udevProcessNetworkInterface (node_device_udev.c:722)
      ==3770==    by 0x1F0E689F: udevGetDeviceDetails (node_device_udev.c:1300)
      ==3770==    by 0x1F0E6E06: udevAddOneDevice (node_device_udev.c:1422)
      ==3770==    by 0x1F0E6FB8: udevProcessDeviceListEntry (node_device_udev.c:1464)
      ==3770==    by 0x1F0E70CF: udevEnumerateDevices (node_device_udev.c:1494)
      ==3770==    by 0x1F0E7BB4: nodeStateInitialize (node_device_udev.c:1806)
      ==3770==    by 0x51B4303: virStateInitialize (libvirt.c:777)
      ==3770==    by 0x11DEE7: daemonRunStateInit (libvirtd.c:906)
      ==3770==  Address 0x228e38d4 is on thread 12's stack
      ==3770==  in frame #2, created by virNetDevFeatureAvailable (virnetdev.c:2750)
      
      * src/util/virnetdev.c (virNetDevFeatureAvailable): Initialize all
      bytes of ifr.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a9abc08d
    • E
      virsh: fix report of non-active commit completion · ceec58ac
      Eric Blake 提交于
      Commit f182da20 (v1.2.6) caused a slight regression in virsh
      reporting of a non-active block job; where it used to state
      "Commit complete", it now states "Now in synchronized phase".
      But the synchronized phase is only possible for an active commit.
      
      For a reproducer, I created a chain 'a <- b <- c <- d <- e' and
      ran virsh blockcommit $dom vda --top c --base a --verbose --wait
      
      * tools/virsh-domain.c (cmdBlockCommit): Synchronized phase is
      only possible on active commits.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ceec58ac
  3. 14 3月, 2015 6 次提交
  4. 13 3月, 2015 13 次提交
  5. 12 3月, 2015 13 次提交
    • M
      parallels: add VIR_ARCH_I686 capability to parallels driver · eaf1539d
      Maxim Nestratov 提交于
      as soon as x32 architecture is also supported
      eaf1539d
    • J
      Error out on an address for isa-serial in QEMU driver. · a00e5c66
      Ján Tomko 提交于
      We've never formatted them on the qemu command line.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1164053
      a00e5c66
    • J
      xenapi: Resolve Coverity REVERSE_INULL · eab968c7
      John Ferlan 提交于
      Coverity notes in xenapiDomainGetXMLDesc that 'vms' is dereferenced
      a few times before a "if (vms) xen_vm_set_free(vms);" call is made.
      Since we'd exit out much sooner if the fetch of the vms failed, just
      remove the unnecessary "if (vms)" check.
      eab968c7
    • J
      xenapi: Resolve Coverity REVERSE_INULL · 6da29e0f
      John Ferlan 提交于
      Coverity complains that "net_set" is compared to NULL before calling
      xen_network_set_free, but used rather liberally before that.  While
      I was looking at the code I also noted that if the virAsprintfQuiet
      fails, then we leak our structures - so I added those too.
      6da29e0f
    • J
      xenapi: Resolve Coverity NULL_RETURNS · b193a1d6
      John Ferlan 提交于
      Coverity points out that the return from virDomainDefParseString is
      not checked in xenapiDomainCreateXML like it should be which could
      end up in a NULL pointer dereference
      b193a1d6
    • J
      xenapi: Resolve Coverity NO_EFFECT · 467c9059
      John Ferlan 提交于
      Coverity points out that check (def->uuid) has no effect since it's not
      a pointer, rather an array of characters.   Just remove the extranous check.
      467c9059
    • J
      xenapi: Resolve Coverity FORWARD_NULL · 500d77f1
      John Ferlan 提交于
      Since inception.  Coverity complains that the code checks "(record ==
      NULL && !session->ok)", but doesn't check (record != NULL) before
      dereferencing at "record->is_a_template"
      500d77f1
    • J
      conf: Resolve Coverity RESOURCE_LEAK · d9beeb68
      John Ferlan 提交于
      Commit id 'c9027d8f' added parsing of the CapNet for offload SRIOV NIC
      discovery, but forgot to free the nodes
      d9beeb68
    • J
      virsh: Add iothreadpin command · 1cfc0a99
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1135491
      
      $ virsh iothread --help
      
        NAME
          iothreadpin - control domain IOThread affinity
      
        SYNOPSIS
          iothreadpin <domain> <iothread> <cpulist> [--config] [--live] [--current]
      
        DESCRIPTION
          Pin domain IOThreads to host physical CPUs.
      
        OPTIONS
          [--domain] <string>  domain name, id or uuid
          [--iothread] <number>  IOThread ID number
          [--cpulist] <string>  host cpu number(s) to set
          --config         affect next boot
          --live           affect running domain
          --current        affect current domain
      
      Using the output from iothreadsinfo, allow changing the pinned CPUs for
      a single IOThread.
      
      $ virsh iothreadsinfo $dom
       IOThread ID    CPU Affinity
      ---------------------------------------------------
       1               2
       2               3
       3               0-1
      
      $ virsh iothreadpin $dom 3 0-2
      
      Then view the change
      
      $ virsh iothreadsinfo $dom
       IOThread ID    CPU Affinity
      ---------------------------------------------------
       1               2
       2               3
       3               0-2
      
      If an invalid value is supplied or require option missing,
      then an error will be displayed:
      
      $ virsh iothreadpin $dom 4 3
      error: invalid argument: iothread value out of range 4 > 3
      
      $ virsh iothreadpin $dom 3
      error: command 'iothreadpin' requires <cpulist> option
      1cfc0a99
    • J
      qemu: Add support to pin IOThreads to specific CPU · fb562614
      John Ferlan 提交于
      Add qemuDomainPinIOThread to handle setting the CPU affinity
      for a specific IOThread
      fb562614
    • J
      domain: Introduce virDomainIOThreadsPin{Add|Del} · e8787191
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1135491
      
      More or less a virtual copy of the existing virDomainVcpuPin{Add|Del} API's.
      
      NB: The IOThreads implementation "reused" the virDomainVcpuPinDefPtr
      since it provided everything necessary - an "id" and a "map" for each
      thread id configured.
      e8787191
    • J
      remote: Implement the plumbing for virDomainPinIOThread · d8977b8e
      John Ferlan 提交于
      Implement the remote plumbing.
      d8977b8e
    • J
      Implement public API for virDomainPinIOThread · 71b234ce
      John Ferlan 提交于
      Add virDomainPinIOThread to allow setting the CPU affinity for a specific
      IOThread based on the output generated from virDomainGetIOThreadsInfo
      
      The API supports updating both the --live domain and the --config data
      71b234ce
  6. 11 3月, 2015 1 次提交
    • M
      virNetworkObjFindBy*: Return an reference to found object · 68818dcd
      Michal Privoznik 提交于
      This patch turns both virNetworkObjFindByUUID() and
      virNetworkObjFindByName() to return an referenced object so that
      even if caller unlocks it, it's for sure that object won't
      disappear meanwhile. Especially if the object (in general) is
      locked and unlocked during the caller run.
      Moreover, this commit is nicely small, since the object unrefing
      can be done in virNetworkObjEndAPI().
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      68818dcd