net/txgbe: fix security session destroy

Replace mempool_put with memset 0, the internal session memory block
is no longer allocated from a mempool

Fixes: 3f3fc3308bd0 ("security: remove private mempool usage")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com>
This commit is contained in:
Radu Nicolau 2022-10-13 13:19:13 +01:00 committed by Qi Zhang
parent aeb8fd549e
commit 055c9fc0d8

View File

@ -409,7 +409,6 @@ txgbe_crypto_remove_session(void *device,
{
struct rte_eth_dev *eth_dev = device;
struct txgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session);
struct rte_mempool *mempool = rte_mempool_from_obj(ic_session);
if (eth_dev != ic_session->dev) {
PMD_DRV_LOG(ERR, "Session not bound to this device\n");
@ -421,7 +420,7 @@ txgbe_crypto_remove_session(void *device,
return -EFAULT;
}
rte_mempool_put(mempool, (void *)ic_session);
memset(ic_session, 0, sizeof(struct txgbe_crypto_session));
return 0;
}