numam-dpdk/lib/librte_vhost
Maxime Coquelin 5efb18e85f vhost: fix deadlock on port deletion
If the vhost-user application (e.g. OVS) deletes the vhost-user
port while Qemu sends a vhost-user request, a deadlock can
happen if the request handler tries to acquire vhost-user's
global mutex, which is also locked by the vhost-user port
deletion API (rte_vhost_driver_unregister).

This patch prevents the deadlock by making
rte_vhost_driver_unregister() to release the mutex and try
again if a request is being handled to give a chance to
the request handler to complete.

Fixes: 8b4b949144 ("vhost: fix dead lock on closing in server mode")
Fixes: 5fbb3941da ("vhost: introduce driver features related APIs")
Cc: stable@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
2020-01-17 19:46:26 +01:00
..
fd_man.c vhost: fix race condition when adding fd in the fdset 2018-12-21 16:22:40 +01:00
fd_man.h vhost: fix race condition when adding fd in the fdset 2018-12-21 16:22:40 +01:00
iotlb.c vhost: add dynamic logging system 2020-01-17 19:46:01 +01:00
iotlb.h vhost: replace IOTLB license with SPDX tag 2019-08-05 16:06:11 +02:00
Makefile build: remove individual library versions 2019-11-20 23:05:39 +01:00
meson.build build: remove individual library versions 2019-11-20 23:05:39 +01:00
rte_vdpa.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_vhost_crypto.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_vhost_version.map vhost: support config change slave message 2020-01-17 19:46:26 +01:00
rte_vhost.h vhost: support config change slave message 2020-01-17 19:46:26 +01:00
socket.c vhost: fix deadlock on port deletion 2020-01-17 19:46:26 +01:00
vdpa.c vhost: convert buffer addresses to GPA for logging 2019-10-23 16:43:09 +02:00
vhost_crypto.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
vhost_user.c vhost: support config change slave message 2020-01-17 19:46:26 +01:00
vhost_user.h vhost: support config change slave message 2020-01-17 19:46:26 +01:00
vhost.c vhost: add dynamic logging system 2020-01-17 19:46:01 +01:00
vhost.h vhost: add dynamic logging system 2020-01-17 19:46:01 +01:00
virtio_crypto.h vhost: add virtio crypto header file 2018-04-14 00:43:30 +02:00
virtio_net.c vhost: add dynamic logging system 2020-01-17 19:46:01 +01:00