[dpdk-dev] [PATCH] vdpa/mlx5: fix configuration mutex cleanup

Maxime Coquelin maxime.coquelin at redhat.com
Wed Jan 27 13:01:18 CET 2021



On 1/6/21 7:43 AM, Matan Azrad wrote:
> 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: 99abbd62c272 ("vdpa/mlx5: fix queue update synchronization")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Matan Azrad <matan at nvidia.com>
> Acked-by: Xueming Li <xuemingl at nvidia.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Applied to dpdk-next-virtio/main.

Thanks,
Maxime



More information about the dev mailing list