1. 27 8月, 2019 1 次提交
  2. 09 8月, 2019 1 次提交
    • J
      qemu: Pass correct qemuCaps to virDomainDefCopy · bbcfa07b
      Jiri Denemark 提交于
      Since qemuDomainDefPostParse callback requires qemuCaps, we need to make
      sure it gets the capabilities stored in the domain's private data if the
      domain is running. Passing NULL may cause QEMU capabilities probing to
      be triggered in case QEMU binary changed in the meantime. When this
      happens while a running domain object is locked, QMP event delivered to
      the domain before QEMU capabilities probing finishes will deadlock the
      event loop.
      
      Several general functions from domain_conf.c were lazily passing NULL as
      the parseOpaque pointer instead of letting their callers pass the right
      data. This patch fixes all paths leading to virDomainDefCopy to do the
      right thing.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      bbcfa07b
  3. 07 8月, 2019 1 次提交
  4. 17 6月, 2019 2 次提交
  5. 30 4月, 2019 1 次提交
  6. 16 4月, 2019 2 次提交
  7. 04 3月, 2019 1 次提交
  8. 07 2月, 2019 1 次提交
  9. 30 7月, 2018 1 次提交
  10. 27 7月, 2018 4 次提交
  11. 26 7月, 2018 2 次提交
    • M
      lxc: Don't mangle @cfg refs in virLXCProcessBuildControllerCmd · e6d3e46b
      Michal Privoznik 提交于
      The config object is refed but unrefed only on error which leaves
      refcount unbalanced on successful return.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      e6d3e46b
    • M
      lxc: Don't leak @veths in virLXCProcessStart · 696a9faa
      Michal Privoznik 提交于
      The individual strings are freed, but the array is never freed.
      
       8 bytes in 1 blocks are definitely lost in loss record 28 of 1,098
          at 0x4C2CE3F: malloc (vg_replace_malloc.c:298)
          by 0x4C2F1BF: realloc (vg_replace_malloc.c:785)
          by 0x52C9C92: virReallocN (viralloc.c:245)
          by 0x52C9D88: virExpandN (viralloc.c:294)
          by 0x23414D99: virLXCProcessSetupInterfaces (lxc_process.c:552)
          by 0x23417457: virLXCProcessStart (lxc_process.c:1356)
          by 0x2341F71C: lxcDomainCreateWithFiles (lxc_driver.c:1088)
          by 0x2341F805: lxcDomainCreate (lxc_driver.c:1123)
          by 0x55917EB: virDomainCreate (libvirt-domain.c:6534)
          by 0x1367D1: remoteDispatchDomainCreate (remote_daemon_dispatch_stubs.h:4434)
          by 0x1366EA: remoteDispatchDomainCreateHelper (remote_daemon_dispatch_stubs.h:4410)
          by 0x546FDF1: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      696a9faa
  12. 27 6月, 2018 1 次提交
  13. 12 6月, 2018 1 次提交
  14. 04 5月, 2018 3 次提交
    • J
      conf: Clean up object referencing for Add and Remove · b04629b6
      John Ferlan 提交于
      When adding a new object to the domain object list, there should
      have been 2 virObjectRef calls made one for each list into which
      the object was placed to match the 2 virObjectUnref calls that
      would occur during Remove as part of virHashRemoveEntry when
      virObjectFreeHashData is called when the element is removed from
      the hash table as set up in virDomainObjListNew.
      
      Some drivers (libxl, lxc, qemu, and vz) handled this inconsistency
      by calling virObjectRef upon successful return from virDomainObjListAdd
      in order to use virDomainObjEndAPI when done with the returned @vm.
      While others (bhyve, openvz, test, and vmware) handled this via only
      calling virObjectUnlock upon successful return from virDomainObjListAdd.
      
      This patch will "unify" the approach to use virDomainObjEndAPI
      for any @vm successfully returned from virDomainObjListAdd.
      
      Because list removal is so tightly coupled with list addition,
      this patch fixes the list removal algorithm to return the object
      as entered - "locked and reffed".  This way, the callers can then
      decide how to uniformly handle add/remove success and failure.
      This removes the onus on the caller to "specially handle" the
      @vm during removal processing.
      
      The Add/Remove logic allows for some logic simplification such
      as in libxl where we can Remove the @vm directly rather than
      needing to set a @remove_dom boolean and removing after the
      libxlDomainObjEndJob completes as the @vm is locked/reffed.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      b04629b6
    • M
      lxc/: Remove spaces after casts · aa2c1a16
      Martin Kletzander 提交于
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      aa2c1a16
    • D
      nwfilter: pass vm name in when instantiating filters · 23ed8eb2
      Daniel P. Berrangé 提交于
      The vm name is not needed for any functional requirement, but it will be
      useful when debugging problems to identify which VM is associated with a
      filter, since UUID is not human friendly.
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      23ed8eb2
  15. 12 4月, 2018 1 次提交
  16. 10 4月, 2018 1 次提交
  17. 02 4月, 2018 1 次提交
  18. 09 2月, 2018 1 次提交
  19. 05 10月, 2017 1 次提交
  20. 25 7月, 2017 2 次提交
  21. 16 6月, 2017 1 次提交
  22. 22 10月, 2016 1 次提交
  23. 13 10月, 2016 1 次提交
    • M
      src: Treat PID as signed · b7d2d4af
      Michal Privoznik 提交于
      This initially started as a fix of some debug printing in
      virCgroupDetect. However it turned out that other places suffer
      from the similar problem. While dealing with pids, esp. in cases
      where we cannot use pid_t for ABI stability reasons, we often
      chose an unsigned integer type. This makes no sense as pid_t is
      signed.
      Also, new syntax-check rule is introduced so we won't repeat this
      mistake.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b7d2d4af
  24. 09 9月, 2016 1 次提交
  25. 19 7月, 2016 2 次提交
  26. 02 7月, 2016 1 次提交
  27. 27 6月, 2016 2 次提交
  28. 06 6月, 2016 2 次提交
    • J
      Do not check for domain liveness in virDomainObjSetDefTransient · 8c40ede4
      Ján Tomko 提交于
      Remove the live attribute and mark the definition as transient
      whether the domain is runing or not.
      
      There were only two callers left calling with live=false:
      * testDomainStartState, where the domain already is active
        because we assigned vm->def->id just a few lines above the call
      * virDomainObjGetPersistentDef, which now only calls
        virDomainObjSetDefTransient for an active domain
      8c40ede4
    • J
      Clean up redundant usage of virDomainObjSetDefTransient · 9b111048
      Ján Tomko 提交于
      Commit 45ec297d from November 2010:
          Make state driver device hotplug/update actually transient
      added virDomainObjSetDefTransient calls to the domain startup
      function in several drivers.
      
      In November 2011, commit 8866eed0:
          Set aliases for LXC/UML console devices
      added a call earlier in the startup function, without removing the
      existing ones.
      
      Also, in the UML driver it seems the function never did anything
      useful - vm->def->id is set asynchronnously in umlNotifyEvent.
      At the time of calling virDomainObjSetDefTransient with live=false,
      vm->def->id was likely still -1, making the call a no-op.
      9b111048