From: Arek Kusztal Date: Wed, 15 Jun 2022 05:57:56 +0000 (+0100) Subject: crypto/qat: fix cleanup function default behaviour X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4c1a91b21f22295928ef230041fd47ed92c4bf58;p=dpdk.git 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 --- 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); } }