From: Zhiyong Yang Date: Mon, 10 Jul 2017 08:06:48 +0000 (+0800) Subject: vhost: fix initialization X-Git-Tag: spdx-start~2460 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=78b2e3bae1af7fc8b9994193ff90846fa5520eb7 vhost: fix initialization 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 Tested-by: Lei Yao Reviewed-by: Jens Freimann Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 57b86c0174..41aa3f9b2b 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -669,6 +669,9 @@ rte_vhost_driver_register(const char *path, uint64_t flags) vhost_user.vsockets[vhost_user.vsocket_cnt++] = vsocket; + pthread_mutex_unlock(&vhost_user.mutex); + return ret; + out_mutex: if (pthread_mutex_destroy(&vsocket->conn_mutex)) { RTE_LOG(ERR, VHOST_CONFIG,