From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 816BCA0A0C; Fri, 2 Jul 2021 12:37:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89E9C413A3; Fri, 2 Jul 2021 12:37:03 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9FC4A4139B for ; Fri, 2 Jul 2021 12:37:01 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 162AVGO1007977 for ; Fri, 2 Jul 2021 03:37:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=P8Iywur/heOkUqnJDl6nyNjZqIllTv16TuxX5FH9Gok=; b=XkuZSEW1FYZIg5NLy5eSzd05ZRvkYg2WSPlDave+1ijotn0xE0ZyG2C/H1yqjSt5Pw/S tRZIWo1OrmQW2kMElotgFujDsZdw0nU24OEQMIaZ+4yuFV7/Dx8fCmmsrbigTbsgu5ml qkoqAIbwRLDV1xN8vMaI0b/gqQcDFPbDpWTlSDA84I8hlerEmfynLAkESqmafmuVwLP2 XwJd6+EOYTqH4kZgwGc6gT7T1CChTC0bxS91r4xA4Ww8o5Jpjt008FvtUxWr6e6TLiVz BnjnfET518Wex3nMSFuqQmWEBPqe60bY2ldfhnBGPJu1RCk6P8sZUpb8ZCSbRV+z7733 1Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 39gxj0r0xm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 02 Jul 2021 03:37:00 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 2 Jul 2021 03:36:58 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 2 Jul 2021 03:36:58 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.1]) by maili.marvell.com (Postfix) with ESMTP id 24F215B6937; Fri, 2 Jul 2021 03:36:55 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Jerin Jacob CC: Anoob Joseph , Ankur Dwivedi , Tejasree Kondoj , Date: Fri, 2 Jul 2021 16:06:36 +0530 Message-ID: <1625222196-215-2-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625222196-215-1-git-send-email-anoobj@marvell.com> References: <1625222196-215-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 4SHd5Ft9AvYAZzKPVPCRRjQdqsh21l62 X-Proofpoint-ORIG-GUID: 4SHd5Ft9AvYAZzKPVPCRRjQdqsh21l62 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-02_01:2021-07-02, 2021-07-02 signatures=0 Subject: [dpdk-dev] [PATCH 2/2] crypto/octeontx2: clear session priv mem upon destroy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" During session destroy, clear session private memory. Signed-off-by: Anoob Joseph --- drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c index 3c5686a..a5db400 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c @@ -589,6 +589,8 @@ otx2_crypto_sec_session_destroy(void *device __rte_unused, sess_mp = rte_mempool_from_obj(priv); + memset(priv, 0, sizeof(*priv)); + set_sec_session_private_data(sess, NULL); rte_mempool_put(sess_mp, priv); -- 2.7.4