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: <Yi+UHF37rb0URSwb@lunn.ch>
Date:   Mon, 14 Mar 2022 20:14:36 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     Oleksij Rempel <o.rempel@...gutronix.de>,
        Oliver Neukum <oneukum@...e.com>,
        Oleksij Rempel <linux@...pel-privat.de>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: ordering of call to unbind() in usbnet_disconnect

On Mon, Mar 14, 2022 at 07:42:34PM +0100, Lukas Wunner wrote:
> [cc += Heiner Kallweit, Andrew Lunn]
> 
> On Thu, Mar 10, 2022 at 12:38:20PM +0100, Oleksij Rempel wrote:
> > On Thu, Mar 10, 2022 at 12:25:08PM +0100, Oliver Neukum wrote:
> > > I got bug reports that 2c9d6c2b871d ("usbnet: run unbind() before
> > > unregister_netdev()")
> > > is causing regressions.
> 
> I would like to see this reverted as well.  For obvious reasons,
> the order in usbnet_disconnect() should be the inverse of
> usbnet_probe().  Since 2c9d6c2b871d, that's no longer the case.
> 
> 
> > > Rather than simply reverting it,
> > > it seems to me that the call needs to be split. One in the old place
> > > and one in the place you moved it to.
> 
> I disagree.  The commit message claims that the change is necessary
> because phy_disconnect() fails if called with phydev->attached_dev == NULL.

The only place i see which sets phydev->attached_dev is
phy_attach_direct(). So if phydev->attached_dev is NULL, the PHY has
not been attached, and hence there is no need to call
phy_disconnect().

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ