patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: wangyunjian <wangyunjian@huawei.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dpdk-dev <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
	 Maciej Czekaj <mczekaj@marvell.com>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	 xudingke <xudingke@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/thunderx: fix memory leak when allocate rbdr desc ring fails
Date: Sat, 31 Oct 2020 18:48:44 +0530	[thread overview]
Message-ID: <CALBAE1O8KbkXjsCEctT3fEKF6L9KG=NR_XuJCDkkD-EKqB-dnA@mail.gmail.com> (raw)
In-Reply-To: <6d9af419c1c9eeac76f59b7484471e69c4fa43a6.1603172717.git.wangyunjian@huawei.com>

On Tue, Oct 20, 2020 at 8:33 PM wangyunjian <wangyunjian@huawei.com> wrote:
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> In nicvf_qset_rbdr_alloc(), we allocate memory for the 'rbdr'
> structure but not released when allocate 'rbdr desc ring' fails.
>
> Fixes: 7413feee662d ("net/thunderx: add device start/stop and close")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>


Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-main. Thanks

> ---
>  drivers/net/thunderx/nicvf_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index f0bd20a22b..b6bb05e500 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -638,6 +638,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
>                                       NICVF_RBDR_BASE_ALIGN_BYTES, nic->node);
>         if (rz == NULL) {
>                 PMD_INIT_LOG(ERR, "Failed to allocate mem for rbdr desc ring");
> +               rte_free(rbdr);
>                 return -ENOMEM;
>         }
>
> --
> 2.23.0
>

      reply	other threads:[~2020-10-31 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 15:02 wangyunjian
2020-10-31 13:18 ` 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='CALBAE1O8KbkXjsCEctT3fEKF6L9KG=NR_XuJCDkkD-EKqB-dnA@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=mczekaj@marvell.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).