> -----Original Message-----
> From: Yang, Zhiyong
> Sent: Monday, July 10, 2017 4:07 PM
> To: dev@dpdk.org
> Cc: y...@fridaylinux.org; maxime.coque...@redhat.com; Yao, Lei A
> <lei.a....@intel.com>; Yang, Zhiyong <zhiyong.y...@intel.com>
> Subject: [PATCH] vhost: fix vhost-user init failed
> 
> 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 <lei.a....@intel.com>
> Signed-off-by: Zhiyong Yang <zhiyong.y...@intel.com>
Tested-by: Lei Yao <lei.a....@intel.com>
This patch can fix the vhost-init issue on my server. 

> ---
>  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

Reply via email to