From nobody Tue May 7 21:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532523776485667.614957228239; Wed, 25 Jul 2018 06:02:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 888744ACAD; Wed, 25 Jul 2018 13:02:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51F0B10018FB; Wed, 25 Jul 2018 13:02:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F15B94A469; Wed, 25 Jul 2018 13:02:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6PD2eDB030408 for ; Wed, 25 Jul 2018 09:02:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 358392026DEF; Wed, 25 Jul 2018 13:02:40 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id CADF32026D68 for ; Wed, 25 Jul 2018 13:02:39 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 25 Jul 2018 15:02:07 +0200 Message-Id: <56f03f7e4ea34b444b29b6abd827214fcfa4843f.1532523694.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/5] lxc: Refresh capabilities on virConnectGetCapabilities X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 25 Jul 2018 13:02:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" While not as critical as in qemu driver, there are still some runtime information we report in capabilities XML that might change throughout time. For instance, onlined CPUs (which affects reported L3 cache sizes). Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- src/lxc/lxc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 9b329269a9..6969dddcab 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -205,7 +205,7 @@ static char *lxcConnectGetCapabilities(virConnectPtr co= nn) { if (virConnectGetCapabilitiesEnsureACL(conn) < 0) return NULL; =20 - if (!(caps =3D virLXCDriverGetCapabilities(driver, false))) + if (!(caps =3D virLXCDriverGetCapabilities(driver, true))) return NULL; =20 xml =3D virCapabilitiesFormatXML(caps); --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 21:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532523769555172.0640205879373; Wed, 25 Jul 2018 06:02:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCD5D317C40B; Wed, 25 Jul 2018 13:02:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9ECF85D9CD; Wed, 25 Jul 2018 13:02:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3B80418037F1; Wed, 25 Jul 2018 13:02:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6PD2eQh030413 for ; Wed, 25 Jul 2018 09:02:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id D1CDD2026DEF; Wed, 25 Jul 2018 13:02:40 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 732402026D68 for ; Wed, 25 Jul 2018 13:02:40 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 25 Jul 2018 15:02:08 +0200 Message-Id: <067605e05a883a3e0e34765c822db0a51b53b3c2.1532523694.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/5] lxc: Report supported huge pages X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 25 Jul 2018 13:02:48 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There are two places where we report supported sizes of huge pages: /capabilities/host/cpu/pages /capabilities/host/topology/cells/cell/pages The former aggregates sizes over all NUMA nodes while the latter reports supported sizes only for given node. While we are reporting per NUMA node sizes we are not reporting the aggregated sizes. I've noticed this when wondering why doesn't allocpages completer work. Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- src/lxc/lxc_conf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c index 5cd6f231dd..949bfe246a 100644 --- a/src/lxc/lxc_conf.c +++ b/src/lxc/lxc_conf.c @@ -86,6 +86,10 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver) if (driver && virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0) VIR_WARN("Failed to get host power management capabilities"); =20 + /* Add huge pages info */ + if (virCapabilitiesInitPages(caps) < 0) + VIR_WARN("Failed to get pages info"); + if (virGetHostUUID(caps->host.host_uuid)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("cannot get the host uuid")); --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 21:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532523777035439.7588162744719; Wed, 25 Jul 2018 06:02:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 495413082140; Wed, 25 Jul 2018 13:02:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0FF933001A65; Wed, 25 Jul 2018 13:02:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AEAED4A46E; Wed, 25 Jul 2018 13:02:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6PD2fOB030421 for ; Wed, 25 Jul 2018 09:02:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7CF662026DEF; Wed, 25 Jul 2018 13:02:41 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E36A2026D68 for ; Wed, 25 Jul 2018 13:02:40 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 25 Jul 2018 15:02:09 +0200 Message-Id: <2512f6bef5a224de26044f0da827c6c45ead774d.1532523694.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/5] lxc: Enable under valgrind again X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 25 Jul 2018 13:02:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" So we originally disabled LXC driver when libvirtd is running under valgrind back in 05436ab7ff087 (which dates to beginning of 2009) as it was causing valgrind to crash. It's not the case anymore. Valgrind works with LXC happily. Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- src/lxc/lxc_driver.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 6969dddcab..8867645cdc 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1550,19 +1550,8 @@ static int lxcStateInitialize(bool privileged, void *opaque ATTRIBUTE_UNUSED) { virCapsPtr caps =3D NULL; - const char *ld; virLXCDriverConfigPtr cfg =3D NULL; =20 - /* Valgrind gets very annoyed when we clone containers, so - * disable LXC when under valgrind - * XXX remove this when valgrind is fixed - */ - ld =3D virGetEnvBlockSUID("LD_PRELOAD"); - if (ld && strstr(ld, "vgpreload")) { - VIR_INFO("Running under valgrind, disabling driver"); - return 0; - } - /* Check that the user is root, silently disable if not */ if (!privileged) { VIR_INFO("Not running privileged, disabling driver"); --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 21:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532523769085559.1840522901139; Wed, 25 Jul 2018 06:02:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C413BDD1; Wed, 25 Jul 2018 13:02:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58DEE308BDB1; Wed, 25 Jul 2018 13:02:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EF71418037F0; Wed, 25 Jul 2018 13:02:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6PD2g0e030426 for ; Wed, 25 Jul 2018 09:02:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 257A02026DEF; Wed, 25 Jul 2018 13:02:42 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBC9B2026D68 for ; Wed, 25 Jul 2018 13:02:41 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 25 Jul 2018 15:02:10 +0200 Message-Id: <8ba1dbbfc8219fdfed5b007187f421166ec8693c.1532523694.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/5] lxc: Don't leak @veths in virLXCProcessStart X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 25 Jul 2018 13:02:48 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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_s= tubs.h:4410) by 0x546FDF1: virNetServerProgramDispatchCall (virnetserverprogram.c:43= 7) Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- src/lxc/lxc_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 14502e12fe..3e44da1aaf 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1559,6 +1559,7 @@ int virLXCProcessStart(virConnectPtr conn, virCommandFree(cmd); for (i =3D 0; i < nveths; i++) VIR_FREE(veths[i]); + VIR_FREE(veths); for (i =3D 0; i < nttyFDs; i++) VIR_FORCE_CLOSE(ttyFDs[i]); VIR_FREE(ttyFDs); --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 21:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532523776658699.627973365193; Wed, 25 Jul 2018 06:02:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F26975F72B; Wed, 25 Jul 2018 13:02:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFB9A5B681; Wed, 25 Jul 2018 13:02:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 602114A46D; Wed, 25 Jul 2018 13:02:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6PD2gCt030436 for ; Wed, 25 Jul 2018 09:02:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id C257A2026DEF; Wed, 25 Jul 2018 13:02:42 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 635422026D68 for ; Wed, 25 Jul 2018 13:02:42 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 25 Jul 2018 15:02:11 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] lxc: Don't mangle @cfg refs in virLXCProcessBuildControllerCmd X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 25 Jul 2018 13:02:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The config object is refed but unrefed only on error which leaves refcount unbalanced on successful return. Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- src/lxc/lxc_process.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 3e44da1aaf..d021a890f7 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -931,7 +931,7 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver, filterstr =3D virLogGetFilters(); if (!filterstr) { virReportOOMError(); - goto cleanup; + goto error; } =20 virCommandAddEnvPair(cmd, "LIBVIRT_LOG_FILTERS", filterstr); @@ -943,7 +943,7 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver, outputstr =3D virLogGetOutputs(); if (!outputstr) { virReportOOMError(); - goto cleanup; + goto error; } =20 virCommandAddEnvPair(cmd, "LIBVIRT_LOG_OUTPUTS", outputstr); @@ -973,7 +973,7 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver, char *tmp =3D NULL; if (virAsprintf(&tmp, "--share-%s", nsInfoLocal[i]) < 0) - goto cleanup; + goto error; virCommandAddArg(cmd, tmp); virCommandAddArgFormat(cmd, "%d", nsInheritFDs[i]); virCommandPassFD(cmd, nsInheritFDs[i], 0); @@ -999,11 +999,13 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr drive= r, * write the live domain status XML with the PID */ virCommandRequireHandshake(cmd); =20 + cleanup: + virObjectUnref(cfg); return cmd; - cleanup: + error: virCommandFree(cmd); - virObjectUnref(cfg); - return NULL; + cmd =3D NULL; + goto cleanup; } =20 =20 --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list