From: Yunjian Wang <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <jingjing.wu@intel.com>,
<beilei.xing@intel.com>, <haiyue.wang@intel.com>,
<jiawenwu@trustnetic.com>, <jianwang@trustnetic.com>,
<dingxiaoxiong@huawei.com>, <huangshaozhang@huawei.com>,
Yunjian Wang <wangyunjian@huawei.com>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 1/3] net/ixgbe: set pointer to NULL after free
Date: Tue, 15 Feb 2022 21:01:51 +0800 [thread overview]
Message-ID: <652bd4da8f728423eca3554b13f26e5838b96d6b.1644927269.git.wangyunjian@huawei.com> (raw)
In-Reply-To: <cover.1644927269.git.wangyunjian@huawei.com>
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
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
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;
--
2.27.0
next prev parent reply other threads:[~2022-02-15 13:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 10:24 [dpdk-dev] [PATCH 0/3] fixes for ixgbe/txgbe/iavf Yunjian Wang
2022-02-15 10:24 ` [dpdk-dev] [PATCH 1/3] net/ixgbe: set pointer to NULL after free Yunjian Wang
2022-02-15 12:00 ` Wang, Haiyue
2022-02-15 10:24 ` [dpdk-dev] [PATCH 2/3] net/txgbe: " Yunjian Wang
2022-02-15 10:25 ` [dpdk-dev] [PATCH 3/3] net/iavf: " Yunjian Wang
2022-02-15 12:02 ` Wang, Haiyue
2022-02-15 12:10 ` wangyunjian
2022-02-15 13:01 ` [dpdk-dev] [PATCH v2 0/3] fixes for ixgbe/txgbe/iavf Yunjian Wang
2022-02-15 13:01 ` Yunjian Wang [this message]
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 2/3] net/txgbe: set pointer to NULL after free Yunjian Wang
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 3/3] net/iavf: " Yunjian Wang
2022-02-15 14:27 ` [dpdk-dev] [PATCH v2 0/3] fixes for ixgbe/txgbe/iavf Ferruh Yigit
2022-02-16 14:17 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=652bd4da8f728423eca3554b13f26e5838b96d6b.1644927269.git.wangyunjian@huawei.com \
--to=wangyunjian@huawei.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=dingxiaoxiong@huawei.com \
--cc=ferruh.yigit@intel.com \
--cc=haiyue.wang@intel.com \
--cc=huangshaozhang@huawei.com \
--cc=jianwang@trustnetic.com \
--cc=jiawenwu@trustnetic.com \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).