patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Vargas, Hernan" <hernan.vargas@intel.com>
To: "Coquelin, Maxime" <maxime.coquelin@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"gakhil@marvell.com" <gakhil@marvell.com>,
	"Rix, Tom" <trix@redhat.com>
Cc: "Chautru, Nicolas" <nicolas.chautru@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v2 1/7] baseband/acc: acc100 free harq layout pointer
Date: Wed, 11 Jan 2023 16:45:25 +0000	[thread overview]
Message-ID: <DM6PR11MB366080A9542E655E3F646CB5EFFC9@DM6PR11MB3660.namprd11.prod.outlook.com> (raw)
In-Reply-To: <2c7808ba-0bb5-2ccf-724a-e6dd2f080c61@redhat.com>

Hi Maxime,

d->harq_layout = NULL is already in de acc100_dev_close function.

Thanks,
Hernan

-----Original Message-----
From: Maxime Coquelin <maxime.coquelin@redhat.com> 
Sent: Friday, January 6, 2023 2:53 AM
To: Vargas, Hernan <hernan.vargas@intel.com>; dev@dpdk.org; gakhil@marvell.com; trix@redhat.com
Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
Subject: Re: [PATCH v2 1/7] baseband/acc: acc100 free harq layout pointer



On 1/6/23 06:44, Hernan Vargas wrote:
> Explicitly call rte_free for harq_layout pointer in dev_close function 
> to prevent memory leak.
> 
> Fixes: ba2262fe16c ("baseband/acc100: fix close cleanup")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   drivers/baseband/acc/rte_acc100_pmd.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/baseband/acc/rte_acc100_pmd.c 
> b/drivers/baseband/acc/rte_acc100_pmd.c
> index ba8247d47e..0177a9e0ea 100644
> --- a/drivers/baseband/acc/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> @@ -622,6 +622,7 @@ acc100_dev_close(struct rte_bbdev *dev)
>   		rte_free(d->tail_ptrs);
>   		rte_free(d->info_ring);
>   		rte_free(d->sw_rings_base);
> +		rte_free(d->harq_layout);
>   		d->sw_rings_base = NULL;
>   		d->tail_ptrs = NULL;
>   		d->info_ring = NULL;

Please set d->harq_layout to NULL for consistency and to prevent double free.

Maxime


  reply	other threads:[~2023-01-11 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230106054443.199473-1-hernan.vargas@intel.com>
2023-01-06  5:44 ` Hernan Vargas
2023-01-06  8:53   ` Maxime Coquelin
2023-01-11 16:45     ` Vargas, Hernan [this message]
2023-01-06  5:44 ` [PATCH v2 2/7] baseband/acc: acc100 fix iteration counter in TB Hernan Vargas
2023-01-06  8:54   ` Maxime Coquelin
     [not found] ` <20230106054443.199473-5-hernan.vargas@intel.com>
     [not found]   ` <3982580c-efa0-441a-1599-1f9243aeaf7a@redhat.com>
2023-01-06  9:13     ` [PATCH v2 4/7] baseband/acc: acc100 fix queue mapping to 64 bits Maxime Coquelin
2023-01-06 22:06       ` Vargas, Hernan

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=DM6PR11MB366080A9542E655E3F646CB5EFFC9@DM6PR11MB3660.namprd11.prod.outlook.com \
    --to=hernan.vargas@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=nicolas.chautru@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=trix@redhat.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).