[libvirt] [PATCH] doc: fix incorrect option in blockjob

2011-08-02 Thread ajia
* tools/virsh.pod: change 'live' to 'abort' based on actual option. Signed-off-by: Alex Jia a...@redhat.com --- tools/virsh.pod |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index f6f9908..01b8fd6 100644 --- a/tools/virsh.pod +++

Re: [libvirt] [PATCH] doc: fix incorrect option in blockjob

2011-08-02 Thread Daniel Veillard
On Tue, Aug 02, 2011 at 02:09:31PM +0800, a...@redhat.com wrote: * tools/virsh.pod: change 'live' to 'abort' based on actual option. Signed-off-by: Alex Jia a...@redhat.com --- tools/virsh.pod |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.pod

[libvirt] [PATCH] virsh: fix memory leak in cmdNetworkInfo

2011-08-02 Thread ajia
I have ever discussed this issue with Matthias, and he has fixed this leak in cmdNetworkInfo codes, but he hasn't committed a patch to upstream so that bug 722806 is always assigned status, so commit it to avoid this patch missing. * tools/virsh.c: avoid memory leak in cmdNetworkInfo. * how to

Re: [libvirt] [PATCH] virsh: fix memory leak in cmdNetworkInfo

2011-08-02 Thread Osier Yang
于 2011年08月02日 16:31, Alex Jia 写道: I have ever discussed this issue with Matthias, and he has fixed this leak in cmdNetworkInfo codes, but he hasn't committed a patch to upstream so that bug 722806 is always assigned status, so commit it to avoid this patch missing. * tools/virsh.c: avoid memory

Re: [libvirt] [PATCH] rpc: avoid libvirtd crash on unexpected client close

2011-08-02 Thread Daniel P. Berrange
On Mon, Aug 01, 2011 at 01:53:19PM -0600, Eric Blake wrote: Steps to reproduce this problem (vm1 is not running): for i in `seq 50`; do virsh managedsave vm1 done; killall virsh Pre-patch, virNetServerClientClose could end up setting client-sock to NULL prior to other cleanup functions

Re: [libvirt] virNetClientPtr leak in remote driver

2011-08-02 Thread Daniel P. Berrange
On Mon, Aug 01, 2011 at 06:35:21PM +0200, Matthias Bolte wrote: 2011/8/1 Eric Blake ebl...@redhat.com: On 07/28/2011 12:07 PM, Matthias Bolte wrote: 2011/7/27 Matthias Bolte matthias.bo...@googlemail.com: doRemoteClose doesn't free the virNetClientPtr and this creates a 260kb leak per

Re: [libvirt] [PATCHv4 1/2] conf: add listen subelement to domain graphics element

2011-08-02 Thread Daniel P. Berrange
On Thu, Jul 28, 2011 at 11:09:40AM -0600, Eric Blake wrote: On 07/28/2011 12:11 AM, Laine Stump wrote: Once it's plugged in, thelisten element will be an optional replacement for the listen attribute that graphics elements already have. If thelisten element is type='address', it will have an

Re: [libvirt] [PATCH] freebsd: Add gnulib environ module for the commandtest

2011-08-02 Thread Daniel P. Berrange
On Thu, Jul 28, 2011 at 07:56:18AM -0600, Eric Blake wrote: On 07/28/2011 07:52 AM, Matthias Bolte wrote: At least all tests compile on FreeBSD again. But most of the SSH cases in virnetmessagetest are failing and I don't understand why yet. Could it be a PATH vs. exec() issue, where BSD

Re: [libvirt] [virt-tools-list] ANNOUNCE: virt-manager 0.9.0 and virtinst 0.600.0 released

2011-08-02 Thread Daniel P. Berrange
On Mon, Aug 01, 2011 at 09:13:07AM -0400, Cole Robinson wrote: On 07/30/2011 01:15 PM, Richard W.M. Jones wrote: On Thu, Jul 28, 2011 at 12:31:10PM -0400, Cole Robinson wrote: - Use libguestfs to show guest packagelist and more (Richard W.M. Jones) I had one complaint that the dependency

Re: [libvirt] [PATCH] Fix bug #611823 prohibit pools with duplicate storage

2011-08-02 Thread Daniel P. Berrange
On Fri, Jul 29, 2011 at 12:34:15PM +0800, Lei Li wrote: To make sure the unique storage pool defined and created from different directory to avoid inconsistent version of volume pool created, I add two API be called by storage driver to check for the probable duplicate pools and refused the

Re: [libvirt] [Libvirt] [PATCH v2] Fix bug #611823 prohibit pools with duplicate storage

2011-08-02 Thread Daniel P. Berrange
On Mon, Aug 01, 2011 at 02:12:51PM -0600, Eric Blake wrote: On 07/31/2011 10:58 PM, Lei Li wrote: Make sure the unique storage pool defined and create from different directory to avoid inconsistent version of volume pool created. Wrap your commit messages; typically at 70 columns or so

Re: [libvirt] [Libvirt] [PATCH v3] Fix bug #611823 prohibit pools with duplicate storage

2011-08-02 Thread Daniel P. Berrange
On Tue, Aug 02, 2011 at 10:42:47AM +0800, Lei Li wrote: Make sure the unique storage pool defined and create from different directory to avoid inconsistent version of volume pool created. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- src/conf/storage_conf.c | 25

Re: [libvirt] [PATCH 0/3 RFC] macvtap: Implement getPhysfn to support sending a port profile message for a VF to its PF

2011-08-02 Thread Daniel P. Berrange
On Mon, Aug 01, 2011 at 09:16:09PM -0400, Dave Allan wrote: On Mon, Aug 01, 2011 at 04:56:58PM -0700, Roopa Prabhu wrote: This patch tries to fix getPhysFn in macvtap.c to get the physical function(PF) of the direct attach interface, if the interface is a SR-IOV VF. It derives the PF/VF

Re: [libvirt] [PATCH] freebsd: Add gnulib environ module for the commandtest

2011-08-02 Thread Matthias Bolte
2011/8/2 Daniel P. Berrange berra...@redhat.com: On Thu, Jul 28, 2011 at 07:56:18AM -0600, Eric Blake wrote: On 07/28/2011 07:52 AM, Matthias Bolte wrote: At least all tests compile on FreeBSD again. But most of the SSH cases in virnetmessagetest are failing and I don't understand why yet.

Re: [libvirt] [virt-tools-list] ANNOUNCE: virt-manager 0.9.0 and virtinst 0.600.0 released

2011-08-02 Thread Richard W.M. Jones
On Tue, Aug 02, 2011 at 12:05:19PM +0100, Daniel P. Berrange wrote: On Mon, Aug 01, 2011 at 09:13:07AM -0400, Cole Robinson wrote: On 07/30/2011 01:15 PM, Richard W.M. Jones wrote: On Thu, Jul 28, 2011 at 12:31:10PM -0400, Cole Robinson wrote: - Use libguestfs to show guest packagelist

Re: [libvirt] [PATCH 1/3 RFC] Add function to get the network interface name of a pci device

2011-08-02 Thread Roopa Prabhu
On 8/1/11 6:00 PM, Stefan Berger stef...@linux.vnet.ibm.com wrote: On 08/01/2011 07:57 PM, Roopa Prabhu wrote: From: Roopa Prabhuropra...@cisco.com This function looks at sysfs net directory to get the network interface name associated with the pci device Signed-off-by: Roopa

Re: [libvirt] [PATCH 2/3 RFC] Add functions to get sriov PF/VF relationship of a network interface

2011-08-02 Thread Roopa Prabhu
On 8/1/11 6:10 PM, Stefan Berger stef...@linux.vnet.ibm.com wrote: On 08/01/2011 07:57 PM, Roopa Prabhu wrote: From: Roopa Prabhuropra...@cisco.com This patch adds helper functions to derive the PF/VF relationship of an sriov network device Signed-off-by: Roopa

Re: [libvirt] [PATCH 0/3 RFC] macvtap: Implement getPhysfn to support sending a port profile message for a VF to its PF

2011-08-02 Thread Roopa Prabhu
On 8/2/11 4:15 AM, Daniel P. Berrange berra...@redhat.com wrote: On Mon, Aug 01, 2011 at 09:16:09PM -0400, Dave Allan wrote: On Mon, Aug 01, 2011 at 04:56:58PM -0700, Roopa Prabhu wrote: This patch tries to fix getPhysFn in macvtap.c to get the physical function(PF) of the direct attach

Re: [libvirt] libvirt-0.9.1 to 0.9.3-r1: managedsave/save won't start/restore at saved state

2011-08-02 Thread Nicolas Sebrecht
The 27/07/11, Nicolas Sebrecht wrote: I'm seeing strange behaviour, here. Any guests saved using both managedsave and save commands from virsh won't restore at saved state. A new full boot sequence happen. - Tested against libvirt v0.9.1, v0.9.2, v0.9.3-r1 (Gentoo) - Confirmed on three

[libvirt] [PATCH] doc: Fix confusing statement about required privileges.

2011-08-02 Thread Peter Krempa
src/libvirt.c: Statement of required hypervisor privileges was probably edited after writing and word may was left in a confusing place. --- src/libvirt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 941cb47..78f303d 100644 ---

Re: [libvirt] [virt-tools-list] ANNOUNCE: virt-manager 0.9.0 and virtinst 0.600.0 released

2011-08-02 Thread Hajime Taira
Hi, I posted Japanese translation po file for virt-manager 0.9.0 via transifex.net. I always read python code for translation work. because virt-manager has so many difficult words about virtualization technology. I take some time. Could you merge po file to virt-manager 0.9.x? Best regards,

Re: [libvirt] [PATCH 2/3 RFC] Add functions to get sriov PF/VF relationship of a network interface

2011-08-02 Thread Stefan Berger
On 08/02/2011 08:46 AM, Roopa Prabhu wrote: On 8/1/11 6:10 PM, Stefan Bergerstef...@linux.vnet.ibm.com wrote: On 08/01/2011 07:57 PM, Roopa Prabhu wrote: From: Roopa Prabhuropra...@cisco.com This patch adds helper functions to derive the PF/VF relationship of an sriov network device

Re: [libvirt] [PATCH] rpc: avoid libvirtd crash on unexpected client close

2011-08-02 Thread Eric Blake
On 08/02/2011 04:41 AM, Daniel P. Berrange wrote: On Mon, Aug 01, 2011 at 01:53:19PM -0600, Eric Blake wrote: Steps to reproduce this problem (vm1 is not running): for i in `seq 50`; do virsh managedsave vm1 done; killall virsh Pre-patch, virNetServerClientClose could end up setting

Re: [libvirt] [PATCH] doc: Fix confusing statement about required privileges.

2011-08-02 Thread Eric Blake
On 08/02/2011 07:03 AM, Peter Krempa wrote: src/libvirt.c: Statement of required hypervisor privileges was probably edited after writing and word may was left in a confusing place. --- src/libvirt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/libvirt.c

Re: [libvirt] [PATCH] doc: Fix confusing statement about required privileges.

2011-08-02 Thread Daniel Veillard
On Tue, Aug 02, 2011 at 03:03:38PM +0200, Peter Krempa wrote: src/libvirt.c: Statement of required hypervisor privileges was probably edited after writing and word may was left in a confusing place. --- src/libvirt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] doc: Fix confusing statement about required privileges.

2011-08-02 Thread Peter Krempa
On 08/02/2011 03:57 PM, Eric Blake wrote: Actually, I'd rather go with 'may require' than 'requires'. And there are multiple culprits, not just this one line. How about this patch instead? Oh, I compared it to a neighbour comment and asumed it was a typo, so I didn't look further. My bad.

Re: [libvirt] [PATCH] qemu: Unlink temporary file on failure

2011-08-02 Thread Eric Blake
On 08/02/2011 09:36 AM, Michal Privoznik wrote: Although virFDStreamOpenFile will unlink it once opened, when we hit error path, we must unlink it by hand. --- src/qemu/qemu_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v2] qemu: Unlink temporary file on failure

2011-08-02 Thread Michal Privoznik
Although virFDStreamOpenFile will unlink it once opened, when we hit error path, we must unlink it by hand. --- src/qemu/qemu_driver.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 09b2791..c78cdb7 100644 ---

Re: [libvirt] [PATCH v2] qemu: Unlink temporary file on failure

2011-08-02 Thread Eric Blake
On 08/02/2011 09:50 AM, Michal Privoznik wrote: Although virFDStreamOpenFile will unlink it once opened, when we hit error path, we must unlink it by hand. --- src/qemu/qemu_driver.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 2/3] rpc: avoid uninitialized memory use

2011-08-02 Thread Eric Blake
Spotted by Coverity. Gnutls documents that buffer must be NULL if gnutls_x509_crt_get_key_purpose_oid is to be used to determine the correct size needed for allocating a buffer. * src/rpc/virnettlscontext.c (virNetTLSContextCheckCertKeyPurpose): Initialize buffer. --- src/rpc/virnettlscontext.c

[libvirt] [PATCH 1/3] rpc: avoid double close on error

2011-08-02 Thread Eric Blake
Spotted by coverity. If pipe2 fails, then we attempt to close uninitialized fds, which may result in a double-close. * src/rpc/virnetserver.c (virNetServerSignalSetup): Initialize fds. --- src/rpc/virnetserver.c |2 +- 1 file changed, 1 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH 0/n] Coverity run

2011-08-02 Thread Eric Blake
I'm doing another coverity cleanup run; Coverity reported as many as 75 errors this time around, but that definitely includes some false positives. I'll add to this thread as I sort through more reports to see which ones are real, but to get things started: Eric Blake (3): rpc: avoid double

[libvirt] [PATCH 3/3] python: avoid unlikely sign extension bug

2011-08-02 Thread Eric Blake
Detected by Coverity; same analysis as for commit f73198df. * python/libvirt-override.c (libvirt_virDomainGetVcpuPinInfo): Use correct type. --- python/libvirt-override.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/python/libvirt-override.c

Re: [libvirt] [PATCH 2/3 RFC] Add functions to get sriov PF/VF relationship of a network interface

2011-08-02 Thread Roopa Prabhu
On 8/2/11 6:46 AM, Stefan Berger stef...@linux.vnet.ibm.com wrote: On 08/02/2011 08:46 AM, Roopa Prabhu wrote: On 8/1/11 6:10 PM, Stefan Bergerstef...@linux.vnet.ibm.com wrote: On 08/01/2011 07:57 PM, Roopa Prabhu wrote: From: Roopa Prabhuropra...@cisco.com This patch adds helper

Re: [libvirt] [PATCH] doc: Fix confusing statement about required privileges.

2011-08-02 Thread Eric Blake
On 08/02/2011 08:10 AM, Peter Krempa wrote: On 08/02/2011 03:57 PM, Eric Blake wrote: Actually, I'd rather go with 'may require' than 'requires'. And there are multiple culprits, not just this one line. How about this patch instead? Oh, I compared it to a neighbour comment and asumed it was

Re: [libvirt] [PATCH v2] qemu: Unlink temporary file on failure

2011-08-02 Thread Eric Blake
On 08/02/2011 09:59 AM, Eric Blake wrote: On 08/02/2011 09:50 AM, Michal Privoznik wrote: Although virFDStreamOpenFile will unlink it once opened, when we hit error path, we must unlink it by hand. --- src/qemu/qemu_driver.c | 5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [Libvirt] [PATCH v2] Fix bug #611823 prohibit pools with duplicate storage

2011-08-02 Thread Lei Li
On 08/02/2011 07:11 PM, Daniel P. Berrange wrote: On Mon, Aug 01, 2011 at 02:12:51PM -0600, Eric Blake wrote: On 07/31/2011 10:58 PM, Lei Li wrote: Make sure the unique storage pool defined and create from different directory to avoid inconsistent version of volume pool created. Wrap your

[libvirt] [PATCH] screenshot: don't unlink bogus file

2011-08-02 Thread Eric Blake
The previous qemu patch could end up calling unlink(tmp) before tmp was the name of a valid file (unlinking a fileXX template instead), or calling unlink(tmp) twice on success (once here, and once at the end of the stream). Meanwhile, vbox also suffered from the same leaked tmp file bug. *

Re: [libvirt] [PATCH 2/3] rpc: avoid uninitialized memory use

2011-08-02 Thread Laine Stump
On 08/02/2011 12:12 PM, Eric Blake wrote: Spotted by Coverity. Gnutls documents that buffer must be NULL if gnutls_x509_crt_get_key_purpose_oid is to be used to determine the correct size needed for allocating a buffer. * src/rpc/virnettlscontext.c (virNetTLSContextCheckCertKeyPurpose):

Re: [libvirt] [PATCH 1/3] rpc: avoid double close on error

2011-08-02 Thread Laine Stump
On 08/02/2011 12:12 PM, Eric Blake wrote: Spotted by coverity. If pipe2 fails, then we attempt to close uninitialized fds, which may result in a double-close. * src/rpc/virnetserver.c (virNetServerSignalSetup): Initialize fds. --- src/rpc/virnetserver.c |2 +- 1 file changed, 1

Re: [libvirt] [PATCH 3/3] python: avoid unlikely sign extension bug

2011-08-02 Thread Laine Stump
On 08/02/2011 12:12 PM, Eric Blake wrote: Detected by Coverity; same analysis as for commit f73198df. * python/libvirt-override.c (libvirt_virDomainGetVcpuPinInfo): Use correct type. --- python/libvirt-override.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH] fdstream: drop delete argument

2011-08-02 Thread Eric Blake
Revert 6a1f5f568f8. Now that libvirt_iohelper no longer has a race where it can open() a file after the parent process has unlink()d the same file, it makes more sense to make the callers both create and unlink, rather than the caller create and the stream unlink. * src/fdstream.h

Re: [libvirt] [Libvirt] [PATCH v2] Fix bug #611823 prohibit pools with duplicate storage

2011-08-02 Thread Lei Li
On 08/02/2011 07:11 PM, Daniel P. Berrange wrote: On Mon, Aug 01, 2011 at 02:12:51PM -0600, Eric Blake wrote: On 07/31/2011 10:58 PM, Lei Li wrote: Make sure the unique storage pool defined and create from different directory to avoid inconsistent version of volume pool created. Wrap your

Re: [libvirt] [PATCH 3/3] python: avoid unlikely sign extension bug

2011-08-02 Thread Eric Blake
On 08/02/2011 11:28 AM, Laine Stump wrote: On 08/02/2011 12:12 PM, Eric Blake wrote: Detected by Coverity; same analysis as for commit f73198df. * python/libvirt-override.c (libvirt_virDomainGetVcpuPinInfo): Use correct type. --- python/libvirt-override.c | 2 +- 1 files changed, 1

[libvirt] [PATCH 4/3] build: allow caching the input to STATIC_ANALYSIS

2011-08-02 Thread Eric Blake
Right now, every re-run of configure re-evaluates whether a static analysis tool is in use. But if you run configure under coverity, make a tweak, and then do an incremental rebuild with gcc but not coverity to test the tweak, then rerun a build under coverity, then configure does not get rerun,

Re: [libvirt] [PATCH] screenshot: don't unlink bogus file

2011-08-02 Thread Laine Stump
On 08/02/2011 01:11 PM, Eric Blake wrote: The previous qemu patch could end up calling unlink(tmp) before tmp was the name of a valid file (unlinking a fileXX template instead), or calling unlink(tmp) twice on success (once here, and once at the end of the stream). Meanwhile, vbox also

[libvirt] [PATCH 5/3] rpc: correctly process sasl whitelist globs

2011-08-02 Thread Eric Blake
Detected by Coverity. We want to compare the result of fnmatch 'rv', not our pre-set return value 'ret'. * src/rpc/virnetsaslcontext.c (virNetSASLContextCheckIdentity): Check correct variable. --- src/rpc/virnetsaslcontext.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [libvirt] [PATCH] fdstream: drop delete argument

2011-08-02 Thread Laine Stump
On 08/02/2011 01:31 PM, Eric Blake wrote: Revert 6a1f5f568f8. Now that libvirt_iohelper no longer has a race where it can open() a file after the parent process has unlink()d the same file, it makes more sense to make the callers both create and unlink, rather than the caller create and the

Re: [libvirt] [PATCH 5/3] rpc: correctly process sasl whitelist globs

2011-08-02 Thread Laine Stump
On 08/02/2011 03:06 PM, Eric Blake wrote: Detected by Coverity. We want to compare the result of fnmatch 'rv', not our pre-set return value 'ret'. * src/rpc/virnetsaslcontext.c (virNetSASLContextCheckIdentity): Check correct variable. --- src/rpc/virnetsaslcontext.c |2 +- 1 files

Re: [libvirt] [PATCH 5/3] rpc: correctly process sasl whitelist globs

2011-08-02 Thread Jiri Denemark
On Tue, Aug 02, 2011 at 13:06:44 -0600, Eric Blake wrote: Detected by Coverity. We want to compare the result of fnmatch 'rv', not our pre-set return value 'ret'. * src/rpc/virnetsaslcontext.c (virNetSASLContextCheckIdentity): Check correct variable. --- src/rpc/virnetsaslcontext.c |

[libvirt] [PATCH 6/3] qemu: avoid null deref on block pull error

2011-08-02 Thread Eric Blake
Coverity detected that 5 of 6 callers of virJSONValueArrayGet checked for a NULL return; and that by not checking we risk a null deref during an error. The error is unlikely since the prior call to virJSONValueArraySize would probably have already caught any botched JSON array parse, but better

Re: [libvirt] [PATCH 4/3] build: allow caching the input to STATIC_ANALYSIS

2011-08-02 Thread Laine Stump
On 08/02/2011 02:31 PM, Eric Blake wrote: Right now, every re-run of configure re-evaluates whether a static analysis tool is in use. But if you run configure under coverity, make a tweak, and then do an incremental rebuild with gcc but not coverity to test the tweak, then rerun a build under

Re: [libvirt] [PATCH] fdstream: drop delete argument

2011-08-02 Thread Eric Blake
On 08/02/2011 01:18 PM, Laine Stump wrote: On 08/02/2011 01:31 PM, Eric Blake wrote: Revert 6a1f5f568f8. Now that libvirt_iohelper no longer has a race where it can open() a file after the parent process has unlink()d the same file, it makes more sense to make the callers both create and

[libvirt] [PATCH 7/3] rpc: avoid crash on error

2011-08-02 Thread Eric Blake
Detected by Coverity. Freeing the wrong variable results in both a memory leak and the likelihood of the caller dereferencing through a freed pointer. * src/rpc/virnettlscontext.c (virNetTLSSessionNew): Free correct variable. --- src/rpc/virnettlscontext.c |2 +- 1 files changed, 1

[libvirt] [PATCH 8/3] conf: avoid memory leak

2011-08-02 Thread Eric Blake
Detected by Coverity. Introduced in commit 85aa40e. * src/conf/domain_conf.c (virDomainDiskDefForeachPath): Plug leak. --- src/conf/domain_conf.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e182cd6..010ce57

[libvirt] [PATCH] qemu: avoid memory leaks

2011-08-02 Thread Eric Blake
Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup instead. * src/qemu/qemu_command.c

[libvirt] [PATCH 10/3] qemu: remove dead code

2011-08-02 Thread Eric Blake
Warning detected by Coverity. No need for the NULL check, and removing it silences the warning without any semantic change. * src/qemu/qemu_migration.c (qemuMigrationFinish): All entries to endjob had non-NULL vm. --- Oops - I forgot to label the subject for 9/3 properly.

[libvirt] [PATCH 11/3] qemu: plug child process leak on domain core dump

2011-08-02 Thread Eric Blake
Detected by Coverity. Leak introduced by typo in commit 58e668d2. * src/qemu/qemu_driver.c (doCoreDump): Use correct function. --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

Re: [libvirt] [PATCH 10/3] qemu: remove dead code

2011-08-02 Thread Laine Stump
On 08/02/2011 04:20 PM, Eric Blake wrote: Warning detected by Coverity. No need for the NULL check, and removing it silences the warning without any semantic change. True. The first function called in qemuMigrationFinish dereferences vm, so we would have crashed long before if it was NULL.

Re: [libvirt] [PATCH] qemu: avoid memory leaks

2011-08-02 Thread Laine Stump
On 08/02/2011 04:10 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup

Re: [libvirt] [PATCH 8/3] conf: avoid memory leak

2011-08-02 Thread Laine Stump
On 08/02/2011 03:50 PM, Eric Blake wrote: Detected by Coverity. Introduced in commit 85aa40e. leak of meta - important point, since the thing being leaked doesn't show up anywhere in the diff. ACK * src/conf/domain_conf.c (virDomainDiskDefForeachPath): Plug leak. ---

Re: [libvirt] [PATCH 7/3] rpc: avoid crash on error

2011-08-02 Thread Laine Stump
On 08/02/2011 03:38 PM, Eric Blake wrote: Detected by Coverity. Freeing the wrong variable results in both a memory leak and the likelihood of the caller dereferencing through a freed pointer. * src/rpc/virnettlscontext.c (virNetTLSSessionNew): Free correct variable. ---

Re: [libvirt] [PATCH 6/3] qemu: avoid null deref on block pull error

2011-08-02 Thread Laine Stump
On 08/02/2011 03:21 PM, Eric Blake wrote: Coverity detected that 5 of 6 callers of virJSONValueArrayGet checked for a NULL return; and that by not checking we risk a null deref during an error. The error is unlikely since the prior call to virJSONValueArraySize would probably have already

Re: [libvirt] [PATCH 11/3] qemu: plug child process leak on domain core dump

2011-08-02 Thread Laine Stump
On 08/02/2011 04:38 PM, Eric Blake wrote: Detected by Coverity. Leak introduced by typo in commit 58e668d2. * src/qemu/qemu_driver.c (doCoreDump): Use correct function. --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] fdstream: drop delete argument

2011-08-02 Thread Eric Blake
On 08/02/2011 01:29 PM, Eric Blake wrote: On 08/02/2011 01:18 PM, Laine Stump wrote: On 08/02/2011 01:31 PM, Eric Blake wrote: Revert 6a1f5f568f8. Now that libvirt_iohelper no longer has a race where it can open() a file after the parent process has unlink()d the same file, it makes more sense

Re: [libvirt] [PATCH 8/3] conf: avoid memory leak

2011-08-02 Thread Eric Blake
On 08/02/2011 02:53 PM, Laine Stump wrote: On 08/02/2011 03:50 PM, Eric Blake wrote: Detected by Coverity. Introduced in commit 85aa40e. leak of meta - important point, since the thing being leaked doesn't show up anywhere in the diff. ACK Good point. I've now pushed 4-8, with this

Re: [libvirt] [PATCH 11/3] qemu: plug child process leak on domain core dump

2011-08-02 Thread Eric Blake
On 08/02/2011 02:59 PM, Laine Stump wrote: On 08/02/2011 04:38 PM, Eric Blake wrote: Detected by Coverity. Leak introduced by typo in commit 58e668d2. * src/qemu/qemu_driver.c (doCoreDump): Use correct function. --- src/qemu/qemu_driver.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [libvirt] [Libvirt] [PATCH v2] Fix bug #611823 prohibit pools with duplicate storage

2011-08-02 Thread Daniel P. Berrange
On Wed, Aug 03, 2011 at 12:52:50AM +0800, Lei Li wrote: On 08/02/2011 07:11 PM, Daniel P. Berrange wrote: On Mon, Aug 01, 2011 at 02:12:51PM -0600, Eric Blake wrote: On 07/31/2011 10:58 PM, Lei Li wrote: Make sure the unique storage pool defined and create from different directory to avoid

Re: [libvirt] [PATCH] qemu: avoid memory leaks

2011-08-02 Thread Eric Blake
On 08/02/2011 02:48 PM, Laine Stump wrote: On 08/02/2011 04:10 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate

[libvirt] [PATCHv2 9/3] qemu: avoid memory leaks

2011-08-02 Thread Eric Blake
Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup instead. * src/qemu/qemu_command.c

Re: [libvirt] [PATCHv2 9/3] qemu: avoid memory leaks

2011-08-02 Thread Eric Blake
On 08/02/2011 03:46 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup

[libvirt] [PATCH 12/3] build: silence coverity false positives

2011-08-02 Thread Eric Blake
Coverity complained that 395 out of 409 virAsprintf calls are checked, and therefore assumed that the remaining cases are bugs waiting to happen. But in each of these cases, a failed virAsprintf will properly set the target string to NULL, and pass on that failure to the caller, without wasting

Re: [libvirt] [PATCH] qemu: avoid memory leaks

2011-08-02 Thread Laine Stump
On 08/02/2011 05:46 PM, Eric Blake wrote: On 08/02/2011 02:48 PM, Laine Stump wrote: On 08/02/2011 04:10 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the

[libvirt] [PATCH 13/3] rpc: avoid null deref

2011-08-02 Thread Eric Blake
Detected by Coverity. * src/rpc/virnetserverclient.c (virNetServerClientDispatchRead): Avoid null deref on OOM. --- src/rpc/virnetserverclient.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index

[libvirt] [PATCH 14/3] rpc: silence coverity false positives

2011-08-02 Thread Eric Blake
In virNetServerNew, Coverity didn't realize that srv-mdsnGroupName can only be non-NULL if mdsnGroupName was non-NULL. In virNetServerRun, Coverity didn't realize that the array is non-NULL if the array count is non-zero. * src/rpc/virnetserver.c (virNetServerNew): Use alternate pointer.

[libvirt] [PATCH 15/3] interface: drop dead code

2011-08-02 Thread Eric Blake
Coverity detected that ifaceGetNthParent had already dereferenced 'nth' prior to the conditional; all callers already complied with passing a non-NULL pointer so make this part of the contract. * src/util/interface.h (ifaceGetNthParent): Add annotations. * src/util/interface.c

[libvirt] [PATCH 16/3] util: plug memory leak

2011-08-02 Thread Eric Blake
Leak detected by Coverity; only possible on unlikely ptsname_r failure. Additionally, the man page for ptsname_r states that failure is merely non-zero, not necessarily -1. * src/util/util.c (virFileOpenTtyAt): Avoid leak on ptsname_r failure. --- src/util/util.c |4 +++- 1 files changed, 3

Re: [libvirt] [PATCHv2 9/3] qemu: avoid memory leaks

2011-08-02 Thread Laine Stump
On 08/02/2011 05:46 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup

Re: [libvirt] [PATCH 12/3] build: silence coverity false positives

2011-08-02 Thread Laine Stump
On 08/02/2011 05:53 PM, Eric Blake wrote: Coverity complained that 395 out of 409 virAsprintf calls are checked, and therefore assumed that the remaining cases are bugs waiting to happen. But in each of these cases, a failed virAsprintf will properly set the target string to NULL, and pass on

Re: [libvirt] [PATCH 13/3] rpc: avoid null deref

2011-08-02 Thread Laine Stump
On 08/02/2011 05:58 PM, Eric Blake wrote: Detected by Coverity. * src/rpc/virnetserverclient.c (virNetServerClientDispatchRead): Avoid null deref on OOM. --- src/rpc/virnetserverclient.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetserverclient.c

Re: [libvirt] [PATCHv2 9/3] qemu: avoid memory leaks

2011-08-02 Thread Eric Blake
On 08/02/2011 03:50 PM, Eric Blake wrote: On 08/02/2011 03:46 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate

[libvirt] [PATCHv3 9/3] qemu: avoid memory leaks

2011-08-02 Thread Eric Blake
Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup instead. * src/qemu/qemu_command.c

Re: [libvirt] [PATCH 14/3] rpc: silence coverity false positives

2011-08-02 Thread Laine Stump
On 08/02/2011 06:04 PM, Eric Blake wrote: In virNetServerNew, Coverity didn't realize that srv-mdsnGroupName can only be non-NULL if mdsnGroupName was non-NULL. In virNetServerRun, Coverity didn't realize that the array is non-NULL if the array count is non-zero. ACK. -- libvir-list mailing

Re: [libvirt] [PATCH 15/3] interface: drop dead code

2011-08-02 Thread Laine Stump
On 08/02/2011 06:09 PM, Eric Blake wrote: Coverity detected that ifaceGetNthParent had already dereferenced 'nth' prior to the conditional; all callers already complied with passing a non-NULL pointer so make this part of the contract. ACK. -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCHv3 9/3] qemu: avoid memory leaks

2011-08-02 Thread Laine Stump
On 08/02/2011 06:34 PM, Eric Blake wrote: Quite a few leaks detected by coverity. For chr, the leaks were close enough to the allocations to plug in place; for disk, the leaks were separated from the allocation by enough other lines with intermediate failure cases that I refactored the cleanup

Re: [libvirt] [PATCH 16/3] util: plug memory leak

2011-08-02 Thread Laine Stump
On 08/02/2011 06:27 PM, Eric Blake wrote: Leak detected by Coverity; only possible on unlikely ptsname_r failure. Additionally, the man page for ptsname_r states that failure is merely non-zero, not necessarily -1. Double ACK. Two bugs in one! -- libvir-list mailing list

[libvirt] [PATCH 17/3] qemu: silence coverity false positives

2011-08-02 Thread Eric Blake
Coverity gets confused by our logic. Add some hints to silence false positives. * src/qemu/qemu_driver.c (qemudDomainGetVcpuPinInfo): Add hint. (qemuDomainGetMemoryParameters): Likewise. --- src/qemu/qemu_driver.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH 17/3] qemu: silence coverity false positives

2011-08-02 Thread Laine Stump
On 08/02/2011 06:47 PM, Eric Blake wrote: Coverity gets confused by our logic. Add some hints to silence false positives. ACK. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 17/3] qemu: silence coverity false positives

2011-08-02 Thread Eric Blake
On 08/02/2011 04:52 PM, Laine Stump wrote: On 08/02/2011 06:47 PM, Eric Blake wrote: Coverity gets confused by our logic. Add some hints to silence false positives. ACK. I've pushed through 17, and run out of time for any more today. Hopefully I picked out the juicy bugs, as evidenced by

Re: [libvirt] [PATCH 17/3] qemu: silence coverity false positives

2011-08-02 Thread Daniel Veillard
On Tue, Aug 02, 2011 at 05:00:19PM -0600, Eric Blake wrote: On 08/02/2011 04:52 PM, Laine Stump wrote: On 08/02/2011 06:47 PM, Eric Blake wrote: Coverity gets confused by our logic. Add some hints to silence false positives. ACK. I've pushed through 17, and run out of time for any more

[libvirt] Release of libvirt-0.9.4

2011-08-02 Thread Daniel Veillard
With an extra day of delay but allowing to pick all coverity checks related patches from Eric, the release is out, I hope it's solid :-) available as usual at: ftp://libvirt.org/libvirt/libvirt-0.9.4.tar.gz along with signed RPMs This is again a fairly big release with more than 400 commits

[libvirt] qemu-kvm=0.14 is unable to boot

2011-08-02 Thread Zdenek Styblik
Hello, I'm wondering what might be behind qemu-kvm=0.14 is unable to boot except from PXE and perhaps virtio HDD. I mean, is somebody running qemu-kvm=0.14 and libvirt-0.9.3/0.9.4 around here, thus is my setup broken? Thanks, Zdenek -- Zdenek Styblik email: sty...@turnovfree.net jabber:

Re: [libvirt] Release of libvirt-0.9.4

2011-08-02 Thread Jason Helfman
With an extra day of delay but allowing to pick all coverity checks related patches from Eric, the release is out, I hope it's solid :-) available as usual at: ftp://libvirt.org/libvirt/libvirt-0.9.4.tar.gz along with signed RPMs This is again a fairly big release with more than 400