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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5494A58E.7000000@gmx.de>
Date:	Fri, 19 Dec 2014 23:24:14 +0100
From:	Lino Sanfilippo <LinoSanfilippo@....de>
To:	Raghu Vatsavayi <rvatsavayi@...iumnetworks.com>,
	davem@...emloft.net
CC:	netdev@...r.kernel.org,
	Derek Chickles <derek.chickles@...iumnetworks.com>,
	Satanand Burla <satananda.burla@...iumnetworks.com>,
	Felix Manlunas <felix.manlunas@...iumnetworks.com>,
	Raghu Vatsavayi <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


--
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