From patchwork Mon Jul 10 08:06:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 26699 X-Patchwork-Delegate: yuanhan.liu@linux.intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id C7D217CD6; Mon, 10 Jul 2017 10:06:57 +0200 (CEST) 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) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2017 01:06:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,339,1496127600"; d="scan'208";a="991139638" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182]) by orsmga003.jf.intel.com with ESMTP; 10 Jul 2017 01:06:51 -0700 From: Zhiyong Yang To: dev@dpdk.org Cc: yliu@fridaylinux.org, maxime.coquelin@redhat.com, lei.a.yao@intel.com, Zhiyong Yang Date: Mon, 10 Jul 2017 16:06:48 +0800 Message-Id: <20170710080648.63443-1-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.9.3 Subject: [dpdk-dev] [PATCH] vhost: fix vhost-user init failed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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 Reviewed-by: Maxime Coquelin Tested-by: Lei Yao --- 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,