From patchwork Thu Oct 5 16:48:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 9987603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D99BE6029B for ; Thu, 5 Oct 2017 16:56:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB35728CFE for ; Thu, 5 Oct 2017 16:56:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF51D28D00; Thu, 5 Oct 2017 16:56:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42CA728CFE for ; Thu, 5 Oct 2017 16:56:07 +0000 (UTC) Received: from localhost ([::1]:40934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e09RO-0003Kx-D8 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 05 Oct 2017 12:56:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e09KR-0006fg-3p for qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e09KO-0001sF-Fp for qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:48:55 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37638 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e09KO-0001rO-AW for qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:48:52 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v95GlMiu057240 for ; Thu, 5 Oct 2017 12:48:50 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ddr3jhgf6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 05 Oct 2017 12:48:50 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Oct 2017 12:48:49 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 5 Oct 2017 12:48:47 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v95GmlrR53936258; Thu, 5 Oct 2017 16:48:47 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A4B8112047; Thu, 5 Oct 2017 12:48:23 -0400 (EDT) Received: from sbct-3.watson.ibm.com (unknown [9.47.158.153]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id 54412112034; Thu, 5 Oct 2017 12:48:23 -0400 (EDT) From: Stefan Berger To: qemu-devel@nongnu.org Date: Thu, 5 Oct 2017 12:48:31 -0400 X-Mailer: git-send-email 2.5.5 In-Reply-To: <1507222112-20315-1-git-send-email-stefanb@linux.vnet.ibm.com> References: <1507222112-20315-1-git-send-email-stefanb@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17100516-0040-0000-0000-000003AD6BC3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007847; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000235; SDB=6.00926882; UDB=6.00466332; IPR=6.00707127; BA=6.00005623; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017408; XFM=3.00000015; UTC=2017-10-05 16:48:49 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100516-0041-0000-0000-000007A27CF4 Message-Id: <1507222112-20315-10-git-send-email-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-05_08:, , 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-1710050231 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PULL v1 09/10] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Amarnath Valluri As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev 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; } - atexit(tpm_cleanup); return 0; } diff --git a/vl.c b/vl.c index 3fed457..f238a30 100644 --- a/vl.c +++ b/vl.c @@ -4908,6 +4908,7 @@ int main(int argc, char **argv, char **envp) res_free(); /* vhost-user must be cleaned up before chardevs. */ + tpm_cleanup(); net_cleanup(); audio_cleanup(); monitor_cleanup();