From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhiyong Yang Subject: [PATCH] vhost: fix vhost-user init failed Date: Mon, 10 Jul 2017 16:06:48 +0800 Message-ID: <20170710080648.63443-1-zhiyong.yang@intel.com> Cc: yliu@fridaylinux.org, maxime.coquelin@redhat.com, lei.a.yao@intel.com, Zhiyong Yang To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1CC727CD2 for ; Mon, 10 Jul 2017 10:06:54 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Exception handling is executed in the normal path and it will cause vhost-user init failure. Fixes: d6983a70e259("vhost: check return of pthread calls") Reported-by: Lei Yao Signed-off-by: Zhiyong Yang --- lib/librte_vhost/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 57b86c0..9d2049c 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -668,7 +668,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags) } vhost_user.vsockets[vhost_user.vsocket_cnt++] = vsocket; - + goto out; out_mutex: if (pthread_mutex_destroy(&vsocket->conn_mutex)) { RTE_LOG(ERR, VHOST_CONFIG, -- 2.9.3