diff mbox series

[RFC,10/16] crypto/dpaa2_sec: fix ctx memset size

Message ID 20210812071244.28799-11-hemant.agrawal@nxp.com
State New
Headers show
Series crypto: add raw vector support in DPAAx | expand

Commit Message

Hemant Agrawal Aug. 12, 2021, 7:12 a.m. UTC
From: Gagandeep Singh <g.singh@nxp.com>


Driver is doing memset on memory more than its allocation.
This patch fixes the size of memset.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>

---
 drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.17.1
diff mbox series

Patch

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
index 87a1a10268..51e316cc00 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
@@ -1019,8 +1019,7 @@  dpaa2_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
 	RTE_SET_USED(qp_id);
 
 	if (!is_update) {
-		memset(raw_dp_ctx, 0, sizeof(*raw_dp_ctx) +
-				sizeof(dpaa2_sec_session));
+		memset(raw_dp_ctx, 0, sizeof(*raw_dp_ctx));
 		raw_dp_ctx->qp_data = dev->data->queue_pairs[qp_id];
 	}