From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: Yunjian Wang <wangyunjian@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Wu, Jingjing" <jingjing.wu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>,
"jiawenwu@trustnetic.com" <jiawenwu@trustnetic.com>,
"jianwang@trustnetic.com" <jianwang@trustnetic.com>,
"dingxiaoxiong@huawei.com" <dingxiaoxiong@huawei.com>,
"huangshaozhang@huawei.com" <huangshaozhang@huawei.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [dpdk-dev] [PATCH 3/3] net/iavf: set pointer to NULL after free
Date: Tue, 15 Feb 2022 12:02:15 +0000 [thread overview]
Message-ID: <BYAPR11MB34950E7DF15B2B8F592494E4F7349@BYAPR11MB3495.namprd11.prod.outlook.com> (raw)
In-Reply-To: <bc4ae5b647546d31f83b6eca6f5be390c0cd38ed.1644842271.git.wangyunjian@huawei.com>
> -----Original Message-----
> From: Yunjian Wang <wangyunjian@huawei.com>
> Sent: Tuesday, February 15, 2022 18:25
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wang, Haiyue <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
>
> 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;
The above two lines can be removed, since it is local var.
> + adapter->vf.eth_dev->security_ctx = NULL;
Also, adapter->security_ctx = NULL ?
>
> return 0;
> }
> --
> 2.27.0
next prev parent reply other threads:[~2022-02-15 12:02 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 [this message]
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=BYAPR11MB34950E7DF15B2B8F592494E4F7349@BYAPR11MB3495.namprd11.prod.outlook.com \
--to=haiyue.wang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=dingxiaoxiong@huawei.com \
--cc=ferruh.yigit@intel.com \
--cc=huangshaozhang@huawei.com \
--cc=jianwang@trustnetic.com \
--cc=jiawenwu@trustnetic.com \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
--cc=wangyunjian@huawei.com \
/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).