From: wangyunjian <wangyunjian@huawei.com>
To: "Wang, Haiyue" <haiyue.wang@intel.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 <dingxiaoxiong@huawei.com>,
Huangshaozhang <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:10:27 +0000 [thread overview]
Message-ID: <0e5c424ea7b14fcf88bcc5c956a2d3fd@huawei.com> (raw)
In-Reply-To: <BYAPR11MB34950E7DF15B2B8F592494E4F7349@BYAPR11MB3495.namprd11.prod.outlook.com>
> -----Original Message-----
> From: Wang, Haiyue [mailto:haiyue.wang@intel.com]
> Sent: Tuesday, February 15, 2022 8:02 PM
> To: wangyunjian <wangyunjian@huawei.com>; 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;
> jianwang@trustnetic.com; dingxiaoxiong <dingxiaoxiong@huawei.com>;
> Huangshaozhang <huangshaozhang@huawei.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 3/3] net/iavf: set pointer to NULL after free
>
> > -----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.
Agree, I will remove them.
>
> > + adapter->vf.eth_dev->security_ctx = NULL;
>
> Also, adapter->security_ctx = NULL ?
OK, I will fix it in next version.
>
> >
> > return 0;
> > }
> > --
> > 2.27.0
next prev parent reply other threads:[~2022-02-15 12:10 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 [this message]
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=0e5c424ea7b14fcf88bcc5c956a2d3fd@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).