[dpdk-dev] [PATCH 08/10] regex/mlx5: fix uninitialized QP destroy

Ori Kam orika at nvidia.com
Sun Oct 24 15:42:54 CEST 2021


Hi Francis,

> -----Original Message-----
> From: Francis Kelly <fkelly at nvidia.com>
> Sent: Friday, October 22, 2021 6:46 PM
> Subject: [PATCH 08/10] regex/mlx5: fix uninitialized QP destroy
> 
> From: Ady Agbarih <adypodoman at gmail.com>
> 
> The number of QPs for a device are setup during the
>  configuration phase, when the user calls
>  rte_regexdev_configure(). The mlx5 regex driver then
>  pre-allocates QPs, however those QPs are not
>  setup/ready for sending jobs. The user has to configure
>  each QP using rte_regexdev_queue_pair_setup(). When
>  stopping the device the driver destroys all QPs that
>  were preallocated assuming that they are all setup. This
>  results in an attempt to destroy an uninitialized QP,
>  leading to a NULL dereference error.
> 
> In order to solve this issue we first check that the
>  QP jobs array has been initialized before attempting
>  to destroy the QP.
> 
> Fixes: 35f8f6c8dbee ("regex/mlx5: add cleanup code")
> Cc: orika at nvidia.com
> 
> Signed-off-by: Ady Agbarih <adypodoman at gmail.com>
> ---

Acked-by: Ori Kam <orika at nvidia.com>
Best,
Ori


More information about the dev mailing list