]> git.droids-corp.org - dpdk.git/commitdiff
crypto/qat: fix cleanup function default behaviour
authorArek Kusztal <arkadiuszx.kusztal@intel.com>
Wed, 15 Jun 2022 05:57:56 +0000 (06:57 +0100)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 21 Jun 2022 18:04:50 +0000 (20:04 +0200)
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 <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
drivers/crypto/qat/qat_asym.c

index 82a0450aed74f81c31474e860cbeda587b42b801..f6ce250c757ef3b289f81af0dce89b3f1b72fbbc 100644 (file)
@@ -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);
        }
 }