lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2a925db95ede48c9924f9416e471cea1@BLUPR03MB486.namprd03.prod.outlook.com>
Date:	Fri, 5 Sep 2014 20:40:57 +0000
From:	"Frank.Li@...escale.com" <Frank.Li@...escale.com>
To:	Fabio Estevam <festevam@...il.com>
CC:	Florian Fainelli <f.fainelli@...il.com>,
	"fugang.duan@...escale.com" <fugang.duan@...escale.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH RFC 1/1] net: fec: change data structure to support
 multiqueue



> -----Original Message-----
> From: Fabio Estevam [mailto:festevam@...il.com]
> Sent: Friday, September 05, 2014 3:33 PM
> To: Li Frank-B20596
> Cc: Florian Fainelli; Duan Fugang-B38611; netdev@...r.kernel.org
> Subject: Re: [PATCH RFC 1/1] net: fec: change data structure to support
> multiqueue
> 
> On Fri, Sep 5, 2014 at 4:39 PM, Frank Li <Frank.Li@...escale.com> wrote:
> 
> > +       txq = kzalloc(sizeof(*txq), GFP_KERNEL);
> > +       if (!txq)
> > +               return -ENOMEM;
> > +       fep->tx_queue[0] = txq;
> > +
> > +       rxq = kzalloc(sizeof(*rxq), GFP_KERNEL);
> > +       if (!rxq) {
> > +               kfree(txq);
> > +               return -ENOMEM;
> > +       }
> 
> ....
> 
> >         /* Allocate memory for buffer descriptors. */
> > -       cbd_base = dma_alloc_coherent(NULL, bd_size, &fep->bd_dma,
> > +       cbd_base = dma_alloc_coherent(NULL, bd_size, &bd_dma,
> >                                       GFP_KERNEL);
> >         if (!cbd_base)
> >                 return -ENOMEM;
> 
> You should kfree txq and rxq before returning here.

Yes, 
Actually this part code will be rewrite totally in next patch. 
You can refer original patch serial. 

Best regards
Frank Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ