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:	Thu, 16 Jun 2016 19:14:06 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Jeremy Linton <jeremy.linton@....com>, netdev@...r.kernel.org
Cc:	steve.glendinning@...well.net, andrew@...n.ch
Subject: Re: [PATCH 2/2] net: smsc911x: Fix register_netdev, phy startup
 ordering and driver unload

Hello.

On 06/16/2016 06:54 PM, Jeremy Linton wrote:

> Previously the mdio and phy's were started in the drv probe following
> register_netdev(). This could lead to a situation where if the netdev was
> opened before the mdio/phys were configured, it would fail with a
> EAGAIN.
>
> Also, the use of phy_connect_direct() in the drv_probe
> routine results in a situation where the module use count would never
> decrease sufficiently to unload the driver.

    It's a bad idea to fix 2 issues with one patch (unless they are caused by 
the same reason). "Do one thing per patch" is a rule of thumb here...

> With this patch the mdio bus is allocated/configured before
> register_netdev(), and the phy's are brought online/started in the
> ndo_open and stopped in the ndo_stop. Because of this, the behavior
> of ethtool changes a little if the interface is stopped. Before the
> phy's would remain up, and their last state would be displayed with
> ethtool. Now ethtool reports link has been severed/Link detected: no
> when the net dev is stopped.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@....com>[...]

[...]

MBR, Sergei

Powered by blists - more mailing lists