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 3/3] net/iavf: set pointer to NULL after free
Date: Tue, 15 Feb 2022 18:25:03 +0800 [thread overview]
Message-ID: <bc4ae5b647546d31f83b6eca6f5be390c0cd38ed.1644842271.git.wangyunjian@huawei.com> (raw)
In-Reply-To: <cover.1644842271.git.wangyunjian@huawei.com>
When iavf_security_ctx_destroy() is cleaning up, it does not correctly
set the security_ctx variable to NULL, which will lead to wild pointer.
Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
drivers/net/iavf/iavf_ipsec_crypto.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index 6ac1b213db..f13849ca1c 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1555,6 +1555,7 @@ iavf_security_ctx_destroy(struct iavf_adapter *adapter)
iavf_sctx = NULL;
sctx = NULL;
+ adapter->vf.eth_dev->security_ctx = NULL;
return 0;
}
--
2.27.0
next prev parent reply other threads:[~2022-02-15 10:25 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 ` Yunjian Wang [this message]
2022-02-15 12:02 ` [dpdk-dev] [PATCH 3/3] net/iavf: " 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 ` [dpdk-dev] [PATCH v2 1/3] net/ixgbe: set pointer to NULL after free Yunjian Wang
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 2/3] net/txgbe: " 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=bc4ae5b647546d31f83b6eca6f5be390c0cd38ed.1644842271.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).