DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>, Jerin Jacob <jerinj@marvell.com>
Cc: Anoob Joseph <anoobj@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/2] crypto/octeontx2: clear session priv mem upon destroy
Date: Fri, 2 Jul 2021 16:06:36 +0530	[thread overview]
Message-ID: <1625222196-215-2-git-send-email-anoobj@marvell.com> (raw)
In-Reply-To: <1625222196-215-1-git-send-email-anoobj@marvell.com>

During session destroy, clear session private memory.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 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


  reply	other threads:[~2021-07-02 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02 10:36 [dpdk-dev] [PATCH 1/2] crypto/octeontx2: reset feature flags during config Anoob Joseph
2021-07-02 10:36 ` Anoob Joseph [this message]
2021-07-07 18:59   ` [dpdk-dev] [PATCH 2/2] crypto/octeontx2: clear session priv mem upon destroy Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1625222196-215-2-git-send-email-anoobj@marvell.com \
    --to=anoobj@marvell.com \
    --cc=adwivedi@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).