DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Coyle, David" <david.coyle@intel.com>
To: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Ryan, Brendan" <brendan.ryan@intel.com>,
	"O'loingsigh, Mairtin" <mairtin.oloingsigh@intel.com>
Subject: Re: [dpdk-dev] [PATCH v1 2/2] crypto/aesni_mb: improve security instance setup
Date: Mon, 20 Jul 2020 12:38:42 +0000	[thread overview]
Message-ID: <MN2PR11MB35509DBE2D40431AFCE979C0E37B0@MN2PR11MB3550.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SN6PR11MB310177BCBD057B475C6D9946847C0@SN6PR11MB3101.namprd11.prod.outlook.com>

Hi Pablo

> -----Original Message-----
> From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Sent: Friday, July 17, 2020 8:29 PM
> >
> >  #ifdef AESNI_MB_DOCSIS_SEC_ENABLED
> > +	struct rte_security_ctx *security_instance;
> >  	security_instance = rte_malloc("aesni_mb_sec",
> >  				sizeof(struct rte_security_ctx),
> >  				RTE_CACHE_LINE_SIZE);
> 
> I see that there could be a potential memory leak here.
> Assuming this malloc works, if alloc_init_mb_mgr() fails, this memory will not
> be freed.
> So I suggest two options:
> 1 - Free security_instance if alloc_init_mb_mgr() fails
> 2 - Move this piece of code after alloc_init_mb_mgr and free mb_mgr if this
> malloc fails.

[DC] Good catch, disappointed I didn't spot that myself :(
This is fixed in v2 coming very shortly - used option 1 above
> 


  reply	other threads:[~2020-07-20 12:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 15:35 [dpdk-dev] [PATCH v1 0/2] " David Coyle
2020-07-16 15:35 ` [dpdk-dev] [PATCH v1 1/2] crypto/qat: " David Coyle
2020-07-17 18:20   ` Trahe, Fiona
2020-07-18 21:36     ` Akhil Goyal
2020-07-18 21:40       ` Akhil Goyal
2020-07-20 12:39         ` Coyle, David
2020-07-16 15:36 ` [dpdk-dev] [PATCH v1 2/2] crypto/aesni_mb: " David Coyle
2020-07-17 19:29   ` De Lara Guarch, Pablo
2020-07-20 12:38     ` Coyle, David [this message]
2020-07-20 12:16 ` [dpdk-dev] [PATCH v2 0/2] " David Coyle
2020-07-20 12:16   ` [dpdk-dev] [PATCH v2 1/2] crypto/qat: " David Coyle
2020-07-20 12:16   ` [dpdk-dev] [PATCH v2 2/2] crypto/aesni-mb: " David Coyle
2020-07-22  7:58     ` De Lara Guarch, Pablo
2020-07-26 19:08   ` [dpdk-dev] [PATCH v2 0/2] " Akhil Goyal

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=MN2PR11MB35509DBE2D40431AFCE979C0E37B0@MN2PR11MB3550.namprd11.prod.outlook.com \
    --to=david.coyle@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=brendan.ryan@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=mairtin.oloingsigh@intel.com \
    --cc=pablo.de.lara.guarch@intel.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).