1. 21 5月, 2010 11 次提交
  2. 20 5月, 2010 10 次提交
  3. 19 5月, 2010 14 次提交
  4. 18 5月, 2010 5 次提交
    • J
      ebiptablesWriteToTempFile: don't close a negative file descriptor · 0058184c
      Jim Meyering 提交于
      * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesWriteToTempFile):
      Skip the close if "fd" is negative.
      0058184c
    • D
      Protect against NULL pointer flaws in monitor usage · 31e29fe5
      Daniel P. Berrange 提交于
      History has shown that there are frequent bugs in the QEMU driver
      code leading to the monitor being invoked with a NULL pointer.
      Although the QEMU driver code should always report an error in
      this case before invoking the monitor, as a safety net put in a
      generic check in the monitor code entry points.
      
      * src/qemu/qemu_monitor.c: Safety net to check for NULL monitor
        object
      31e29fe5
    • D
      Fix multiple potential NULL pointer references in monitor usage · c4b2a939
      Daniel P. Berrange 提交于
      Any method which intends to invoke a monitor command must have
      a check for virDomainObjIsActive() before using the monitor to
      ensure that priv->mon != NULL.
      
      There is one subtle edge case in this though. If a method invokes
      multiple monitor commands, and calls qemuDomainObjExitMonitor()
      in between two of these commands then there is no guarentee that
      priv->mon != NULL anymore. This is because the QEMU process may
      exit or die at any time, and because qemuDomainObjEnterMonitor()
      releases the lock on virDomainObj, it is possible for the background
      thread to close the monitor handle and thus qemuDomainObjExitMonitor
      will release the last reference allowing priv->mon to become NULL.
      
      This affects several methods, most notably migration but also some
      hotplug methods. This patch takes a variety of approaches to solve
      the problem, depending on the particular usage scenario. Generally
      though it suffices to add an extra virDomainObjIsActive() check
      if qemuDomainObjExitMonitor() was called during the method.
      
      * src/qemu/qemu_driver.c: Fix multiple potential NULL pointer flaws
        in usage of the monitor
      c4b2a939
    • J
      maint: add more free-like functions to the list and deal with fallout · a986892e
      Jim Meyering 提交于
      * cfg.mk (useless_free_options): Add many vir*Free* function names,
      and then remove the useless if-before-free tests exposed by running
      make syntax-check.
      * src/conf/interface_conf.c (virInterfaceDefFree): Remove useless "if".
      (virInterfaceAssignDef): Likewise.
      * src/conf/network_conf.c (virNetworkAssignDef): Likewise.
      * src/conf/storage_conf.c (virStoragePoolObjAssignDef): Likewise.
      * src/node_device/node_device_hal.c (dev_create): Likewise.
      * src/security/virt-aa-helper.c (vahDeinit): Likewise.
      * src/test/test_driver.c (testNodeDeviceCreateXML): Likewise.
      * src/util/conf.c (virConfSetValue): Likewise.
      a986892e
    • J
      qemudDomainSetVcpus: avoid NULL-deref on failed uuid look-up · 20701b17
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainSetVcpus): Upon look-up failure,
      i.e., vm==NULL, goto cleanup, rather than to "endjob", superficially
      since the latter would dereference vm, but more fundamentally because
      we certainly don't want to call qemuDomainObjEndJob before we've
      even attempted qemuDomainObjBeginJob.
      20701b17