1. 29 12月, 2011 5 次提交
  2. 28 12月, 2011 3 次提交
    • E
      qemu: fix inf-loop in blkio parameters · 1a3f6608
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=770520
      
      We had two nested loops both trying to use 'i' as the iteration
      variable, which can result in an infinite loop when the inner
      loop interferes with the outer loop.  Introduced in commit 93ab5859.
      
      * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters): Don't
      reuse iteration variable across two loops.
      1a3f6608
    • L
      virsh: move version command to host group · 96b3716c
      Lai Jiangshan 提交于
      Trivial patch, move version command to host commands group.
      
      It has no any related with any domain.
      
      It may connect to the daemon, so the flag is 0 but not VSH_CMD_FLAG_NOCONNECT.
      96b3716c
    • E
      daemon: clean up daemonization · e957b670
      Eric Blake 提交于
      Valgrind detected a pipe fd leak before the parent exits on success,
      introduced in commit 4296cea2; by itself, the leak is not bad, since
      we immediately called _exit(), but we might as well be clean to make
      valgrind analysis easier.  Meanwhile, if the daemon grandchild detects
      an error, the parent failed to flush the error message before exiting.
      Also, we had the possibility of both parent and child returning to the
      caller, such that the user could see duplicated reports of failure
      from the two return paths.  And we might as well be robust to the
      (unlikely) situation of being started with stdin closed.
      
      * daemon/libvirtd.c (daemonForkIntoBackground): Use exit if an
      error message was generated, avoid fd leaks for valgrind's sake,
      avoid returning to caller in both parent and child, and don't
      close a just-dup'd stdin.
      Based on a report by Alex Jia.
      
      * How to reproduce?
        % service libvirtd stop
        % valgrind -v --track-fds=yes /usr/sbin/libvirtd --daemon
      
      * Actual valgrind result:
      
      ==16804== FILE DESCRIPTORS: 7 open at exit.
      ==16804== Open file descriptor 7:
      ==16804==    at 0x321FAD8B87: pipe (in /lib64/libc-2.12.so)
      ==16804==    by 0x41F34D: daemonForkIntoBackground (libvirtd.c:186)
      ==16804==    by 0x4207A0: main (libvirtd.c:1420)
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e957b670
  3. 26 12月, 2011 2 次提交
  4. 25 12月, 2011 1 次提交
  5. 24 12月, 2011 1 次提交
    • E
      docs: remove stray / · d145fe3b
      Eric Blake 提交于
      Commit e5a84d74 added a new attribute in the wrong location;
      commit c8b9fa74 fixed the missing / at the end but not the extra
      / in the middle.
      
      * docs/formatdomain.html.in (elementsDisks): Fix another typo.
      d145fe3b
  6. 23 12月, 2011 3 次提交
  7. 22 12月, 2011 6 次提交
  8. 21 12月, 2011 17 次提交
  9. 20 12月, 2011 2 次提交
    • E
      rpc: handle param_int, plug memory leaks · 4e394dea
      Eric Blake 提交于
      The RPC code had several latent memory leaks and an attempt to
      free the wrong string, but thankfully nothing triggered them
      (blkiotune was the only one returning a string, and always as
      the last parameter).  Also, our cleanups for rpcgen ended up
      nuking a line of code that renders VIR_TYPED_PARAM_INT broken,
      because it was the only use of 'i' in a function, even though
      it was a member usage rather than a standalone declaration.
      
      * daemon/remote.c (remoteSerializeTypedParameters): Free the
      correct array element.
      (remoteDispatchDomainGetSchedulerParameters)
      (remoteDispatchDomainGetSchedulerParametersFlags)
      (remoteDispatchDomainBlockStatsFlags)
      (remoteDispatchDomainGetMemoryParameters): Don't leak strings.
      * src/rpc/genprotocol.pl: Don't nuke member-usage of 'buf' or 'i'.
      4e394dea
    • E
      virsh: simplify printing of typed parameters · f8616336
      Eric Blake 提交于
      No need to repeat code for formatting typed parameters.
      
      * tools/virsh.c (vshGetTypedParamValue): Support strings, and exit
      on OOM.
      (cmdSchedinfo, cmdBlkiotune, cmdMemtune, cmdBlkdeviotune): Use
      it for less code.
      f8616336