DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto/qat: fix uncleared cookies in asym
@ 2022-09-28 15:58 Arek Kusztal
  2022-09-28 15:58 ` [PATCH 2/2] crypto/qat: fix not set rsa lengths Arek Kusztal
  0 siblings, 1 reply; 3+ messages in thread
From: Arek Kusztal @ 2022-09-28 15:58 UTC (permalink / raw)
  To: dev; +Cc: gakhil, kai.ji, Arek Kusztal

Fixed incorrectly placed clean function in asym response.

Fixes: 002486db239e ("crypto/qat: refactor asymmetric session")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_asym.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 19931791c4..4b0538eea8 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -906,6 +906,8 @@ qat_asym_process_response(void **out_op, uint8_t *resp,
 					" returned error");
 		}
 	}
+	if (op->status == RTE_CRYPTO_OP_STATUS_ERROR)
+		goto finalize;
 
 	switch (op->sess_type) {
 	case RTE_CRYPTO_OP_WITH_SESSION:
@@ -923,9 +925,10 @@ qat_asym_process_response(void **out_op, uint8_t *resp,
 	if (op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED) {
 		op->status = qat_asym_collect_response(op,
 					cookie, xform);
-		cleanup(cookie, xform, cookie->alg_bytesize);
 	}
 
+finalize:
+	cleanup(cookie, xform, cookie->alg_bytesize);
 	*out_op = op;
 	HEXDUMP("resp_msg:", resp_msg, sizeof(struct icp_qat_fw_pke_resp));
 
-- 
2.13.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-07 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 15:58 [PATCH 1/2] crypto/qat: fix uncleared cookies in asym Arek Kusztal
2022-09-28 15:58 ` [PATCH 2/2] crypto/qat: fix not set rsa lengths Arek Kusztal
2022-10-07 10:56   ` [EXT] " Akhil Goyal

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).