From 4c1a91b21f22295928ef230041fd47ed92c4bf58 Mon Sep 17 00:00:00 2001 From: Arek Kusztal Date: Wed, 15 Jun 2022 06:57:56 +0100 Subject: [PATCH] crypto/qat: fix cleanup function default behaviour Full cookie data should be cleared by default if not algorithm specified. This is protection in case algorithm specific cleanup is not implemented. Fixes: 3b78aa7b2317 ("crypto/qat: refactor asymmetric crypto functions") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal Acked-by: Fan Zhang --- drivers/crypto/qat/qat_asym.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c index 82a0450aed..f6ce250c75 100644 --- a/drivers/crypto/qat/qat_asym.c +++ b/drivers/crypto/qat/qat_asym.c @@ -144,6 +144,10 @@ cleanup(struct qat_asym_op_cookie *cookie, cleanup_arrays(cookie, QAT_ASYM_RSA_NUM_IN_PARAMS, QAT_ASYM_RSA_NUM_OUT_PARAMS, alg_size); } + } else { + cleanup_arrays(cookie, QAT_ASYM_MAX_PARAMS, + QAT_ASYM_MAX_PARAMS, + QAT_PKE_MAX_LN_SIZE); } } -- 2.39.5