From: David Coyle Date: Tue, 6 Oct 2020 11:40:21 +0000 (+0100) Subject: crypto/aesni_mb: fix security session clearing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8f6187ecf891614cb257832a6be4b993e0f6537c;p=dpdk.git crypto/aesni_mb: fix security session clearing When destroying a security session, the AESNI-MB PMD attempted to clear the private aesni_mb session object to remove any key material. However, the function aesni_mb_pmd_sec_sess_destroy() cleared the security session object instead of the private session object. This patch fixes this issue by now clearing the private session object. Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol") Cc: stable@dpdk.org Signed-off-by: David Coyle Acked-by: Pablo de Lara --- diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index 0f74be126d..e54205f1b8 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -1062,7 +1062,7 @@ aesni_mb_pmd_sec_sess_destroy(void *dev __rte_unused, if (sess_priv) { struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv); - memset(sess, 0, sizeof(struct aesni_mb_session)); + memset(sess_priv, 0, sizeof(struct aesni_mb_session)); set_sec_session_private_data(sess, NULL); rte_mempool_put(sess_mp, sess_priv); }