Skip to content

Commit

Permalink
net/txgbe: reset security context pointer on close
Browse files Browse the repository at this point in the history
[ upstream commit 6d498b8 ]

When txgbe_dev_close() is cleaning up, it does not correctly set
the security_ctx variable to NULL, which will lead to wild pointer.

Fixes: f437d97 ("net/txgbe: add IPsec context creation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
wyjwang authored and kevintraynor committed Feb 28, 2022
1 parent 223010f commit 496747d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/txgbe/txgbe_ethdev.c
Expand Up @@ -2036,6 +2036,7 @@ txgbe_dev_close(struct rte_eth_dev *dev)

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

return ret;
Expand Down

0 comments on commit 496747d

Please sign in to comment.