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]
Date:   Mon, 20 Mar 2023 15:48:41 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Grant Grundler <grundler@...omium.org>
Cc:     Oleksij Rempel <linux@...pel-privat.de>,
        Pavel Skripkin <paskripkin@...il.com>,
        Lukas Wunner <lukas@...ner.de>,
        Eizan Miyamoto <eizan@...omium.org>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        "David S . Miller" <davem@...emloft.net>,
        LKML <linux-kernel@...r.kernel.org>,
        Anton Lundin <glance@....umu.se>
Subject: Re: [PATCHv5 net 1/2] net: asix: fix modprobe "sysfs: cannot create
 duplicate filename"

On Fri, Mar 17, 2023 at 11:13:21AM -0700, Grant Grundler wrote:
> "modprobe asix ; rmmod asix ; modprobe asix" fails with:
>    sysfs: cannot create duplicate filename \
>    	'/devices/virtual/mdio_bus/usb-003:004'
> 
> Issue was originally reported by Anton Lundin on 2022-06-22 (link below).
> 
> Chrome OS team hit the same issue in Feb, 2023 when trying to find
> work arounds for other issues with AX88172 devices.
> 
> The use of devm_mdiobus_register() with usbnet devices results in the
> MDIO data being associated with the USB device. When the asix driver
> is unloaded, the USB device continues to exist and the corresponding
> "mdiobus_unregister()" is NOT called until the USB device is unplugged
> or unauthorized. So the next "modprobe asix" will fail because the MDIO
> phy sysfs attributes still exist.
> 
> The 'easy' (from a design PoV) fix is to use the non-devm variants of
> mdiobus_* functions and explicitly manage this use in the asix_bind
> and asix_unbind function calls. I've not explored trying to fix usbnet
> initialization so devm_* stuff will work.
> 
> Fixes: e532a096be0e5 ("net: usb: asix: ax88772: add phylib support")
> Reported-by: Anton Lundin <glance@....umu.se>
> Link: https://lore.kernel.org/netdev/20220623063649.GD23685@pengutronix.de/T/
> Tested-by: Eizan Miyamoto <eizan@...omium.org>
> Signed-off-by: Grant Grundler <grundler@...omium.org>

Reviewed-by: Simon Horman <simon.horman@...igine.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ