From: Yunjian Wang Date: Tue, 15 Feb 2022 13:01:51 +0000 (+0800) Subject: net/ixgbe: reset security context pointer on close X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=848a37cead7bd604d51b5f04507fea3e59e9088e;p=dpdk.git net/ixgbe: reset security context pointer on close When ixgbe_dev_close() is cleaning up, it does not correctly set the security_ctx variable to NULL, which will lead to wild pointer. Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Haiyue Wang --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3d799d2187..7643842560 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3038,6 +3038,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev) #ifdef RTE_LIB_SECURITY rte_free(dev->security_ctx); + dev->security_ctx = NULL; #endif return ret;