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]
Date:	Fri, 11 Mar 2016 12:46:00 -0800
From:	aaron.young@...cle.com
To:	David Miller <davem@...emloft.net>
CC:	netdev@...r.kernel.org, sowmini.varadhan@...cle.com,
	alexandre.chartre@...cle.com, rashmi.narasimhan@...cle.com
Subject: Re: [PATCH net-next 3/4] ldmvsw: Add ldmvsw.c driver code


  Thank you very much for the review. I'll make the requested changes 
and resubmit the series...

  -Aaron Young

On 03/11/16 11:30, David Miller wrote:
> From: Aaron Young <Aaron.Young@...cle.com>
> Date: Tue,  8 Mar 2016 07:02:35 -0800
>
>> +static struct vnet *vsw_get_vnet(struct mdesc_handle *hp,
>> +				 u64 port_node,
>> +				 u64 *handle)
>> +{
>> +	struct vnet *vp;
>> +	struct vnet *iter;
>> +	const u64 *local_mac = NULL;
>> +	const u64 *cfghandle = NULL;
>> +	u64 a;
> Please order local variable declarations from longest to shortest line (reverse
> christmas tree).
>
>> +static int vsw_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>> +{
>> +	struct mdesc_handle *hp;
>> +	struct vnet_port *port;
>> +	unsigned long flags;
>> +	struct vnet *vp;
>> +	struct net_device *dev;
>> +	const u64 *rmac;
>> +	int len, i, err;
>> +	const u64 *port_id;
>> +	u64 handle;
> Likewise.
>
>> +	err = register_netdev(dev);
>> +	if (err) {
>> +		pr_err("Cannot register net device, aborting\n");
>> +		goto err_out_free_ldc;
>> +	}
>> +
>> +	netif_napi_add(dev, &port->napi, vnet_poll_common,
>> +		       NAPI_POLL_WEIGHT);
>> +
>> +	INIT_LIST_HEAD(&port->list);
> You cannot register the netdevice so early.  It must be registerred only after
> every single piece of software state is initialized and setup.
>
> At the very precise moment you invoke register_netdev() the device can
> be brought up and attempted to be used.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ