From nobody Sat Feb 7 09:04:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1507895386015636.7118661794498; Fri, 13 Oct 2017 04:49:46 -0700 (PDT) Received: from localhost ([::1]:49684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2yT9-0001Vl-3q for importer@patchew.org; Fri, 13 Oct 2017 07:49:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2yPB-0007Ly-94 for qemu-devel@nongnu.org; Fri, 13 Oct 2017 07:45:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2yP7-0002sx-AM for qemu-devel@nongnu.org; Fri, 13 Oct 2017 07:45:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37938) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e2yP7-0002sC-02 for qemu-devel@nongnu.org; Fri, 13 Oct 2017 07:45:25 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9DBhoAb137988 for ; Fri, 13 Oct 2017 07:45:20 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2djtynfb6h-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 13 Oct 2017 07:45:20 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Oct 2017 07:45:19 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Oct 2017 07:45:17 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9DBjHJe41680966; Fri, 13 Oct 2017 11:45:17 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3ED182803A; Fri, 13 Oct 2017 07:45:10 -0400 (EDT) Received: from sbct-3.watson.ibm.com (unknown [9.47.158.153]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id 3247928050; Fri, 13 Oct 2017 07:45:10 -0400 (EDT) From: Stefan Berger To: qemu-devel@nongnu.org Date: Fri, 13 Oct 2017 07:44:59 -0400 X-Mailer: git-send-email 2.5.5 In-Reply-To: <1507895100-26457-1-git-send-email-stefanb@linux.vnet.ibm.com> References: <1507895100-26457-1-git-send-email-stefanb@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17101311-0048-0000-0000-000001F57369 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007890; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000236; SDB=6.00930524; UDB=6.00468429; IPR=6.00710790; BA=6.00005636; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017523; XFM=3.00000015; UTC=2017-10-13 11:45:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101311-0049-0000-0000-000042DBC38A Message-Id: <1507895100-26457-11-git-send-email-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-13_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710130166 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PULL v3 10/11] tpm: Move tpm_cleanup() to right place X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , amarnath.valluri@intel.com, marcandre.lureau@gmail.com, Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Amarnath Valluri As Emulator TPM backend uses chardev, tpm cleanup should happen before char= dev similar to other vhost-users. Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger Signed-off-by: Stefan Berger --- tpm.c | 1 - vl.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tpm.c b/tpm.c index 3b8c7ed..3122227 100644 --- a/tpm.c +++ b/tpm.c @@ -172,7 +172,6 @@ int tpm_init(void) return -1; } =20 - atexit(tpm_cleanup); return 0; } =20 diff --git a/vl.c b/vl.c index d7c3492..0723835 100644 --- a/vl.c +++ b/vl.c @@ -4905,6 +4905,7 @@ int main(int argc, char **argv, char **envp) res_free(); =20 /* vhost-user must be cleaned up before chardevs. */ + tpm_cleanup(); net_cleanup(); audio_cleanup(); monitor_cleanup(); --=20 2.5.5