[dpdk-stable] [PATCH V2 2/4] crypto/mlx5: fix driver destroy before the configuration
Raja Zidane
rzidane at nvidia.com
Mon Nov 8 13:33:52 CET 2021
When calling device close, unset dek is called which destroys a hash list.
In case of error during dev probe, close is called when dek hlist is not
initialized.
Ensure non null list destroy.
Fixes: 90646d6c6e22 ("crypto/mlx5: support basic operations")
Cc: stable at dpdk.org
Signed-off-by: Raja Zidane <rzidane at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
drivers/crypto/mlx5/mlx5_crypto_dek.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/mlx5/mlx5_crypto_dek.c b/drivers/crypto/mlx5/mlx5_crypto_dek.c
index de0d2545d1..472ee373aa 100644
--- a/drivers/crypto/mlx5/mlx5_crypto_dek.c
+++ b/drivers/crypto/mlx5/mlx5_crypto_dek.c
@@ -156,6 +156,8 @@ mlx5_crypto_dek_setup(struct mlx5_crypto_priv *priv)
void
mlx5_crypto_dek_unset(struct mlx5_crypto_priv *priv)
{
- mlx5_hlist_destroy(priv->dek_hlist);
- priv->dek_hlist = NULL;
+ if (priv->dek_hlist) {
+ mlx5_hlist_destroy(priv->dek_hlist);
+ priv->dek_hlist = NULL;
+ }
}
--
2.17.1
More information about the stable
mailing list