From nobody Sun Feb 8 05:59:04 2026 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1564175241; cv=none; d=zoho.com; s=zohoarc; b=B8kUig60DhGIM84iOR01BqabRhP8MFzBFSDfZ9xbeFM5Jc9wi+aR1a5vCCnuSRTKPbG++irrmvBpYt5ompGM7RGHqPyJSGhIdiERuXa8TnhVpHzHmS73M8/afYgXKf+cU/LvkGhJolwXe58gT2ginzDsGBJ7XZtLUOvXLusrqvM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564175241; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=3ER0AqcvetAiOPvkDHaEJol0gUpsjjbpxjwdT7UUnQY=; b=Vj8K5EnkEl36fg0YCCjrqlFKbiFahh8LpgxiT4q68AdmuvbgywJ7iIVMI7NCJlsh8GHK8mNlQB/HgeueKGiPZrujROOLTPyWcLCRHgSAkiRB1/zEllynkpr9PiUHPPLyGHTHN5IWPzTWVZLO9CkraNLoNciblZltnE1qzQfssbc= ARC-Authentication-Results: i=1; mx.zoho.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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156417524175856.74633487096344; Fri, 26 Jul 2019 14:07:21 -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 7CA5F30917AF; Fri, 26 Jul 2019 21:07:19 +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 413175DE6F; Fri, 26 Jul 2019 21:07:19 +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 5149641F53; Fri, 26 Jul 2019 21:07:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6QL7Fcq001224 for ; Fri, 26 Jul 2019 17:07:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id CD7B098A6; Fri, 26 Jul 2019 21:07:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 975DD396B; Fri, 26 Jul 2019 21:07:13 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1189A3084029; Fri, 26 Jul 2019 21:07:13 +0000 (UTC) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6QL75TS146049; Fri, 26 Jul 2019 17:07:12 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 2u05tghhp1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jul 2019 17:07:12 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x6QL55Jq016023; Fri, 26 Jul 2019 21:07:11 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma02wdc.us.ibm.com with ESMTP id 2tymfds1te-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jul 2019 21:07:11 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6QL7AOX59965846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jul 2019 21:07:10 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED9686A051; Fri, 26 Jul 2019 21:07:09 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9496F6A04D; Fri, 26 Jul 2019 21:07:09 +0000 (GMT) Received: from sbct-4.pok.ibm.com (unknown [9.47.158.154]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Jul 2019 21:07:09 +0000 (GMT) From: Stefan Berger To: libvir-list@redhat.com, berrange@redhat.com Date: Fri, 26 Jul 2019 17:07:05 -0400 Message-Id: <20190726210706.24440-2-stefanb@linux.ibm.com> In-Reply-To: <20190726210706.24440-1-stefanb@linux.ibm.com> References: <20190726210706.24440-1-stefanb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-26_15:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907260239 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 26 Jul 2019 21:07:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 26 Jul 2019 21:07:13 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'stefanb@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Stefan Berger Subject: [libvirt] [PATCH v2 1/2] tpm: Set transationStarted to false if commit failed 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: , Content-Type: text/plain; charset="utf-8" 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]); Fri, 26 Jul 2019 21:07:20 +0000 (UTC) Set the transactionStarted to false if the commit failed. If this is not done, then the failure path will report 'no transaction is set' and hide more useful error reports. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_security.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_security.c b/src/qemu/qemu_security.c index 87209d3781..3cd6d9bd3d 100644 --- a/src/qemu/qemu_security.c +++ b/src/qemu/qemu_security.c @@ -476,7 +476,7 @@ qemuSecurityStartTPMEmulator(virQEMUDriverPtr driver, =20 if (virSecurityManagerTransactionCommit(driver->securityManager, -1, priv->rememberOwner) < 0) - goto cleanup; + goto cleanup_abort; transactionStarted =3D false; =20 if (virSecurityManagerSetChildProcessLabel(driver->securityManager, @@ -512,6 +512,7 @@ qemuSecurityStartTPMEmulator(virQEMUDriverPtr driver, -1, priv->rememberOwner) < 0) VIR_WARN("Unable to run security manager transaction"); =20 + cleanup_abort: virSecurityManagerTransactionAbort(driver->securityManager); return ret; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list