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: <56BD23E0.1090403@gmx.de>
Date:	Fri, 12 Feb 2016 01:14:24 +0100
From:	Lino Sanfilippo <LinoSanfilippo@....de>
To:	Bryan.Whitehead@...rochip.com, davem@...emloft.net
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next,V2] Add LAN9352 Ethernet Driver

Hi,

> +static int mchp9352_open(struct net_device *dev)
> +{

> +
> +	MCHP_TRACE(pdata, ifup, "Testing irq handler using IRQ %d", dev->irq);
> +	pdata->software_irq_signal = 0;
> +
> +	/* Testing irq handler */
> +	smp_wmb();

Should not there at least be a matching smp_rmb() in the irq handler?
Maybe an atomic_t would be a better choice for a flag like
software_irq_signal here.

> +
> +static int mchp9352_drv_probe(struct platform_device *pdev)

> +
> +	netif_carrier_off(dev);
> +
> +	retval = register_netdev(dev);
> +	if (retval) {
> +		MCHP_WARN(pdata, probe, "Error %i registering device", retval);
> +		goto out_free_irq;
> +	} else {
> +		MCHP_TRACE(pdata, probe,
> +			   "Network interface: \"%s\"", dev->name);
> +	}

Note that as soon as the network device is registered "open" may be
called so everything should be set up already. In this case the mac
address (dev->dev_addr) is accessed in open but may not yet contain
valid data when register_netdev is called.

Regards,
Lino

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ