]> git.droids-corp.org - dpdk.git/commitdiff
net/ixgbe: reset security context pointer on close
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 15 Feb 2022 13:01:51 +0000 (21:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 16 Feb 2022 14:16:53 +0000 (15:16 +0100)
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 <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/ixgbe/ixgbe_ethdev.c

index 3d799d2187b9377c34e798afbcb5971f6f464722..7643842560d33c0a1e9e535b9a54ffca6d5f9c12 100644 (file)
@@ -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;