numam-spdk/lib/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
..
rte_vhost rte_vhost: fix double free on shutdown 2017-10-23 15:35:25 -04:00
Makefile env: Automatically register new memory with the IOMMU 2017-09-01 15:25:24 -04:00
test_plan.md test/vhost: add vhost with lvol backends test 2017-09-20 12:53:28 -04:00
vhost_blk.c vhost: replaced tasks ring with dynamic array 2017-10-17 13:37:56 -04:00
vhost_internal.h vhost_scsi: validate length of virtio descriptors 2017-10-23 11:53:55 -04:00
vhost_rpc.c vhost/rpc: replace strerror with spdk_strerror_r 2017-10-06 17:47:42 -04:00
vhost_scsi.c vhost_scsi: validate length of virtio descriptors 2017-10-23 11:53:55 -04:00
vhost.c vhost_scsi: validate length of virtio descriptors 2017-10-23 11:53:55 -04:00