net/mlx5: fix Rx/Tx queue checks
authorDmitry Kozlyuk <dkozlyuk@nvidia.com>
Tue, 20 Jul 2021 07:53:35 +0000 (10:53 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 13:49:33 +0000 (15:49 +0200)
commit94e257ec8ca82a98e38ffb9e7c117a8aac554489
treea97a807bbb056d004c0779223d5346018e77698f
parent96f85ec489dbf7e206cdf54906d1e1c1092bc38e
net/mlx5: fix Rx/Tx queue checks

When device configuration was interrupted by a signal,
mlx5_rxq/txq_release() could access yet unitinialized array
and crash the application. Add checks whether queue array
is initialized.

Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")
Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_txq.c