[PATCH] crypto/qat: fix cleanup function default behaviour
Arek Kusztal
arkadiuszx.kusztal at intel.com
Wed Jun 15 07:57:56 CEST 2022
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")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal at intel.com>
---
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 e4ab4bf33d..6e43a6cac8 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.13.6
More information about the dev
mailing list