Hi Francis, > -----Original Message----- > From: Francis Kelly <fke...@nvidia.com> > Sent: Friday, October 22, 2021 6:46 PM > Subject: [PATCH 08/10] regex/mlx5: fix uninitialized QP destroy > > From: Ady Agbarih <adypodo...@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: or...@nvidia.com > > Signed-off-by: Ady Agbarih <adypodo...@gmail.com> > ---
Acked-by: Ori Kam <or...@nvidia.com> Best, Ori