Skip to content

Commit

Permalink
net/ixgbe: reset security context pointer on close
Browse files Browse the repository at this point in the history
[ upstream commit 848a37cead7bd604d51b5f04507fea3e59e9088e ]

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: 9a0752f ("net/ixgbe: enable inline IPsec")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
  • Loading branch information
wyjwang authored and cpaelzer committed Mar 9, 2022
1 parent 9cbe350 commit 8c4cc35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ixgbe/ixgbe_ethdev.c
Expand Up @@ -3102,6 +3102,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)

#ifdef RTE_LIBRTE_SECURITY
rte_free(dev->security_ctx);
dev->security_ctx = NULL;
#endif

}
Expand Down

0 comments on commit 8c4cc35

Please sign in to comment.