DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raja Zidane <rzidane@nvidia.com>
To: <dev@dpdk.org>
Cc: <matan@nvidia.com>
Subject: [PATCH] crypto/mlx5: fix login cleanup
Date: Mon, 18 Apr 2022 14:05:16 +0300	[thread overview]
Message-ID: <20220418110516.2105-1-rzidane@nvidia.com> (raw)

In case of a probing failure caused by wrong devarg provided,
login isn't destroyed when exiting.

Destroy login on failure.

Fixes: ba707cdb6da2 ("crypto/mlx5: fix queue size configuration")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index e14f867797..d0901f3b7c 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -947,6 +947,7 @@ mlx5_crypto_dev_probe(struct mlx5_common_device *cdev,
 	ret = mlx5_crypto_configure_wqe_size(priv,
 		cdev->config.hca_attr.max_wqe_sz_sq, devarg_prms.max_segs_num);
 	if (ret) {
+		claim_zero(mlx5_devx_cmd_destroy(priv->login_obj));
 		mlx5_devx_uar_release(&priv->uar);
 		rte_cryptodev_pmd_destroy(priv->crypto_dev);
 		return -1;
-- 
2.21.0


             reply	other threads:[~2022-04-18 11:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 11:05 Raja Zidane [this message]
2022-04-28 10:14 ` [EXT] " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220418110516.2105-1-rzidane@nvidia.com \
    --to=rzidane@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).