From nobody Fri May 3 03:32:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1573568460; cv=none; d=zoho.com; s=zohoarc; b=e3u1rAp8lCAOCJnkXu1B2AwK19cuHTBDsLp/LOq9ao2k9MvqY1IM8cuVRpesPVJWVPp+NQyB1y/eS8gQIn66s+R1vCIbzfnrBUAjZiIfDBHvs6LhvtWfrA3baE0b0qLtXeaCvo/BW7FuqB0FJ9zS9YR2H1yIpAOngiTWai+O6C8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573568460; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=59kSSaV079P7j5He5XO0HHOYdsubUclef6ktO6Tw5VA=; b=deyQ9qn9OYZFbouOqiK4o24eNeIoFsfBYNFVTWSuWSjHcsVsfJJyDW53LyAcdPBpsPauCx8tJBEhkLs6O6F7y/ZMytybRfDoPILBKDoveeJebbXe6PAUdFJAZ+lNdbZ+ratTzVEWqHMa/zVOQ1DruEiVG/MlFhW1qNapeHxZAJU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1573568460571250.5518130322239; Tue, 12 Nov 2019 06:21:00 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iUX1I-0007iQ-T2; Tue, 12 Nov 2019 14:19:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iUX1H-0007iL-1Q for xen-devel@lists.xenproject.org; Tue, 12 Nov 2019 14:19:47 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7a16c46c-0557-11ea-b678-bc764e2007e4; Tue, 12 Nov 2019 14:19:46 +0000 (UTC) X-Inumbo-ID: 7a16c46c-0557-11ea-b678-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1573568386; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RQ6xVTrcuGn/rcNfejApRRyGTiSnTM5IdSjFficv0zg=; b=PEKRbYalyIhien+uowtjNNLIxOONe7ueAKIh9WsrRgCo+zbCCfJsSUwF dEAFwVueN/DntldV3fz+zIAVwS1nTG4yp2Y06oZQiMF2RXqjA4tepb8Kl S0fGHu8AW2HE+lr9bnO3Zwv6pRuHMLIsYTIauBRyW7xvK+DHao5x8IgFu c=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: hdfHUSVDOaEaEL5RCvtrg/3Oe8J+ezq/1R/AWWcGWLSTymYf+dBEsADOQJMmXaX6PBYmljjdAR o/5q9FFS3BhMbxxSfle+Ioiq6MtPwJfQeLl4AkUhWqBYz78vXlP+5EMuOruQVCeRyXc3CgGc6M LrcS2buybnNhJPIBqIG8kEeUwttIjR7ixo8RByNTUBDCTmo4E4kdic4cXYEjWI5yFJl1H6hzBC 3IbP5YzWPDcnw1DFZC0gh4uz53b482D9q5LAUSvgnCjAwhvD/V0rDfc9AfMiuGiytg6AsEaixJ hgc= X-SBRS: 2.7 X-MesageID: 8722595 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.68,296,1569297600"; d="scan'208";a="8722595" From: Anthony PERARD To: Date: Tue, 12 Nov 2019 14:19:43 +0000 Message-ID: <20191112141943.245215-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH for-4.13] libxl: Fix libxl_retrieve_domain_configuration error path X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?J=C3=BCrgen=20Gro=C3=9F?= , Wei Liu , Ian Jackson , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Anthony PERARD , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Anthony PERARD If an error were to happen before the last step, for example the domain_configuration is missing, the error wouldn't be check by the _end callback. Fix that, also initialise `lock' to NULL because the exit path checks it. The issue shows up when there's a stubdom, and running `xl list -l` aborts. Instead, with this patch, `xl list -l` will not list stubdom, probably like before. Reported-by: Marek Marczykowski-G=C3=B3recki Fixes: 61563419257ed40278938db2cce7d697aed44f5d Signed-off-by: Anthony PERARD Acked-by: Wei Liu Tested-by: Marek Marczykowski-G=C3=B3recki --- tools/libxl/libxl_domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 9d0eb5aed11d..33f9d9eaa481 100644 --- a/tools/libxl/libxl_domain.c +++ b/tools/libxl/libxl_domain.c @@ -1998,12 +1998,14 @@ static void retrieve_domain_configuration_end(libxl= __egc *egc, retrieve_domain_configuration_state *rdcs, int rc) { STATE_AO_GC(rdcs->qmp.ao); - libxl__domain_userdata_lock *lock; + libxl__domain_userdata_lock *lock =3D NULL; =20 /* Convenience aliases */ libxl_domain_config *const d_config =3D rdcs->d_config; libxl_domid domid =3D rdcs->qmp.domid; =20 + if (rc) goto out; + lock =3D libxl__lock_domain_userdata(gc, domid); if (!lock) { rc =3D ERROR_LOCK_FAIL; --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel