DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>,
	"Doherty, Declan" <declan.doherty@intel.com>
Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix NULL pointer dereference
Date: Tue, 1 Aug 2017 07:09:51 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CBE580E@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <8040895.veDesW7eHG@xps>

Hi Thomas,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Monday, July 31, 2017 4:23 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Gonzalez Monroy, Sergio
> <sergio.gonzalez.monroy@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix NULL pointer dereference
> 
> 31/07/2017 14:32, Sergio Gonzalez Monroy:
> > On 31/07/2017 03:30, Pablo de Lara wrote:
> > > --- a/lib/librte_cryptodev/rte_cryptodev.c
> > > +++ b/lib/librte_cryptodev/rte_cryptodev.c
> > > @@ -1404,6 +1404,12 @@ rte_cryptodev_allocate_driver(const struct
> rte_driver *drv)
> > >   	struct cryptodev_driver *driver;
> > >
> > >   	driver = malloc(sizeof(*driver));
> > > +
> > > +	if (driver == NULL)
> > > +		rte_exit(EXIT_FAILURE,
> > > +			"Could not allocate memory for crypto driver %u\n",
> > > +			nb_drivers);
> > > +
> > >   	driver->driver = drv;
> > >   	driver->id = nb_drivers;
> > >
> >
> > Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
> 
> NACK rte_exit/rte_panic in libraries.

I have sent a v2 that allocates statically the structure,
instead of calling malloc, so no rte_exit is required.

Thanks,
Pablo

      reply	other threads:[~2017-08-01  7:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31  2:30 Pablo de Lara
2017-07-31  9:18 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2017-07-31 19:33   ` Thomas Monjalon
2017-08-01  7:10     ` De Lara Guarch, Pablo
2017-08-01  8:13     ` Sergio Gonzalez Monroy
2017-08-01  9:35       ` Thomas Monjalon
2017-08-01 10:17         ` Sergio Gonzalez Monroy
2017-08-01 10:48           ` De Lara Guarch, Pablo
2017-08-01 12:36             ` Thomas Monjalon
2017-08-16  2:41   ` [dpdk-dev] [PATCH v3] cryptodev: allocate driver structure statically Pablo de Lara
2017-09-04 10:38     ` Rybalchenko, Kirill
2017-09-06 10:27       ` De Lara Guarch, Pablo
2017-07-31 12:32 ` [dpdk-dev] [PATCH] cryptodev: fix NULL pointer dereference Sergio Gonzalez Monroy
2017-07-31 15:22   ` Thomas Monjalon
2017-08-01  7:09     ` De Lara Guarch, Pablo [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=E115CCD9D858EF4F90C690B0DCB4D8976CBE580E@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=sergio.gonzalez.monroy@intel.com \
    --cc=thomas@monjalon.net \
    /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).