From: Jerin Jacob <jerinjacobk@gmail.com>
To: Harman Kalra <hkalra@marvell.com>
Cc: wangyunjian <wangyunjian@huawei.com>, dpdk-dev <dev@dpdk.org>,
"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
xudingke <xudingke@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [EXT] [PATCH v1] net/octeontx: fix dangling pointer on failure
Date: Mon, 4 May 2020 07:50:19 +0530 [thread overview]
Message-ID: <CALBAE1NSzHZtLAXD0PP4kg7RXVzXwx8Xap3Cfxqi2ZN=KDQTgg@mail.gmail.com> (raw)
In-Reply-To: <20200408124922.GA4852@outlook.office365.com>
On Wed, Apr 8, 2020 at 6:19 PM Harman Kalra <hkalra@marvell.com> wrote:
>
> On Tue, Apr 07, 2020 at 07:35:43PM +0800, wangyunjian wrote:
> > External Email
> >
> > ----------------------------------------------------------------------
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > When octeontx_create() is cleaning up, it does not correctly set
> > the mac_addrs variable to NULL, which will lead to a double free.
> >
> > Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table")
> > CC: stable@dpdk.org
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
>
> Thanks for fixing.
> Acked-by: Harman Kalra <hkalra@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks
>
> > ---
> > drivers/net/octeontx/octeontx_ethdev.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
> > index e8aa4ec78..437abd7e5 100644
> > --- a/drivers/net/octeontx/octeontx_ethdev.c
> > +++ b/drivers/net/octeontx/octeontx_ethdev.c
> > @@ -1181,6 +1181,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
> >
> > free_mac_addrs:
> > rte_free(data->mac_addrs);
> > + data->mac_addrs = NULL;
> > err:
> > if (nic)
> > octeontx_port_close(nic);
> > --
> > 2.19.1
> >
> >
prev parent reply other threads:[~2020-05-04 2:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 11:35 [dpdk-dev] " wangyunjian
2020-04-08 12:49 ` [dpdk-dev] [EXT] " Harman Kalra
2020-05-04 2:20 ` Jerin Jacob [this message]
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='CALBAE1NSzHZtLAXD0PP4kg7RXVzXwx8Xap3Cfxqi2ZN=KDQTgg@mail.gmail.com' \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=jerry.lilijun@huawei.com \
--cc=stable@dpdk.org \
--cc=wangyunjian@huawei.com \
--cc=xudingke@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).