[1/3] net/iavf: fix security session destroy
Checks
Commit Message
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")
Cc: gakhil@marvell.com
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
drivers/net/iavf/iavf_ipsec_crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> 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")
> Cc: gakhil@marvell.com
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, October 13, 2022 8:24 PM
> To: Nicolau, Radu <radu.nicolau@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [EXT] [PATCH 1/3] net/iavf: 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")
> > Cc: gakhil@marvell.com
> >
> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> > ---
> Acked-by: Akhil Goyal <gakhil@marvell.com>
>
Applied to dpdk-next-net-intel.
Thanks
Qi
@@ -1042,7 +1042,7 @@ iavf_ipsec_crypto_session_destroy(void *device,
return -EINVAL;
ret = iavf_ipsec_crypto_sa_del(adapter, iavf_sess);
- rte_mempool_put(rte_mempool_from_obj(iavf_sess), (void *)iavf_sess);
+ memset(iavf_sess, 0, sizeof(struct iavf_security_session));
return ret;
}