numam-spdk/lib/vhost/rte_vhost
Dariusz Stojaczyk 3788c907bb rte_vhost: fix double free on shutdown
The vhost connection can be closed
concurrently from 2 places:
 * the connection thread itself
 * rte_vhost_driver_unregister
The connection thread will terminate
the connection if any recv error
occured. The unregister function
will terminate the connection
together with the thread.
However, there is no sychronization
between those two. The connection
thread runs in the background
without any mutex.

The rte_vhost_driver_unregister
now signals the connection thread
to terminate itself and waits
until it's killed.

Change-Id: I012e97ebb8a79edcb2c17c28b2fc7e8041bf92b3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383085
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-23 15:35:25 -04:00
..
fd_man.c vhost: upgrade SPDK vhost code to DPDK 17.05 2017-05-08 17:04:29 -07:00
fd_man.h vhost: upgrade SPDK vhost code to DPDK 17.05 2017-05-08 17:04:29 -07:00
Makefile rte_vhost: include rte_config.h via compiler option 2017-09-07 18:02:09 -04:00
rte_vhost.h rte_vhost: added user callbacks for socket open/close 2017-09-01 15:34:24 -04:00
socket.c rte_vhost: fix double free on shutdown 2017-10-23 15:35:25 -04:00
vhost_user.c rte_vhost: fix numa_realloc() copy size 2017-09-07 18:02:09 -04:00
vhost_user.h vhost: upgrade SPDK vhost code to DPDK 17.05 2017-05-08 17:04:29 -07:00
vhost.c vhost: upgrade SPDK vhost code to DPDK 17.05 2017-05-08 17:04:29 -07:00
vhost.h vhost: upgrade SPDK vhost code to DPDK 17.05 2017-05-08 17:04:29 -07:00