vhost: fix initialization
Exception handling is executed in the normal path and it will cause
vhost-user init failure.
Fixes: d6983a70e2
("vhost: check return of pthread calls")
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
39f403e0d5
commit
78b2e3bae1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user