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] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY2PR07MB4866FF8376B356C56116A5FFE6B0@BY2PR07MB486.namprd07.prod.outlook.com>
Date:	Fri, 19 Dec 2014 22:53:52 +0000
From:	"Chickles, Derek" <Derek.Chickles@...iumnetworks.com>
To:	Lino Sanfilippo <LinoSanfilippo@....de>,
	"Vatsavayi, Raghu" <Raghu.Vatsavayi@...iumnetworks.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Burla, Satananda" <Satananda.Burla@...iumnetworks.com>,
	"Manlunas, Felix" <Felix.Manlunas@...iumnetworks.com>,
	"Vatsavayi, Raghu" <Raghu.Vatsavayi@...iumnetworks.com>,
	Stephen Hemminger <stephen@...workplumber.org>
Subject: RE: [PATCH net-next v3] Add support of Cavium Liquidio ethernet
 adapters

> There seem to be various places where GFP_KERNEL could be used instead
> of GFP_ATOMIC, e.g.:
> 
> > +static int setup_nic_devices(struct octeon_device *octeon_dev)
> > +{
> 
> > +
> > +	sc = kmalloc(sizeof(*sc), GFP_ATOMIC);
> > +	if (!sc)
> > +		return -ENOMEM;
> > +
> 
> and
> 
> > +static int liquidio_init_nic_module(int octeon_id, void *octeon_dev)
> > +{
> 
> > +	/* Allocate a soft command to be used to send link status requests
> > +	 * to the core app.
> > +	 */
> > +	sc = kmalloc(sizeof(*sc), GFP_ATOMIC);
> > +	if (!sc) {
> > +		kfree(ls);
> > +		return -ENOMEM;
> 
> also
> 
> > +/*  Configure interrupt moderation parameters */
> > +static int octnet_set_intrmod_cfg(void *oct, struct oct_intrmod_cfg
> *intr_cfg)
> > +{
> > +	struct octeon_soft_command *sc;
> > +	struct oct_intrmod_cmd *cmd;
> > +	int retval;
> > +	struct octeon_device *oct_dev = (struct octeon_device *)oct;
> > +	unsigned char *cfg;
> > +
> > +	/* Alloc soft command */
> > +	sc = (struct octeon_soft_command *)
> > +	     kmalloc(sizeof(struct octeon_soft_command), GFP_ATOMIC);
> > +	if (!sc)
> > +		return -ENOMEM;
> 
> seems only to be called from process context.
> 
> Regards,
> Lino
> 
Thanks, you're right. I think also octnic_alloc_ctrl_pkt_sc() can be GFP_KERNEL.
We'll also examine the other two spots where we use GFP_ATOMIC and make
sure they are correct. 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ