numam-dpdk/drivers/vdpa
Matan Azrad f00e5a15af vdpa/mlx5: fix configuration mutex cleanup
When the vDPA device is closed, the driver polling thread is canceled.
The polling thread locks the configuration mutex while it polls the CQs.

When the cancellation happens, it may terminate the thread inside the
critical section what remains the configuration mutex locked.

After device close, the driver may be configured again, in this case,
for example, when the first queue state is updated, the driver tries to
lock the mutex again and deadlock appears.

Initialize the mutex after the polling thread cancellation.

Fixes: 99abbd62c2 ("vdpa/mlx5: fix queue update synchronization")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2021-01-29 18:16:10 +01:00
..
ifc build: replace use of old build macros 2020-10-19 22:15:44 +02:00
mlx5 vdpa/mlx5: fix configuration mutex cleanup 2021-01-29 18:16:10 +01:00
meson.build config: remove compatibility build defines 2021-01-20 01:43:25 +01:00