On Tue, Jan 14, 2020 at 07:53:57PM +0100, Maxime Coquelin wrote: > 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: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode") > Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs") > Cc: sta...@dpdk.org > > Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> > --- > lib/librte_vhost/socket.c | 20 +++++++++++++++----- > 1 file changed, 15 insertions(+), 5 deletions(-)
Reviewed-by: Tiwei Bie <tiwei....@intel.com>