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
| ||
|
Date: Mon, 21 Jul 2014 15:55:53 -0300 From: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com> To: Florian Fainelli <f.fainelli@...il.com> Cc: netdev <netdev@...r.kernel.org>, David Miller <davem@...emloft.net>, Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>, Gregory Clement <gregory.clement@...e-electrons.com> Subject: Re: [RFC 0/2] net: phy: Prevent an MDIO bus from being unloaded while in use Hi Florian, Thanks for the quick reply. On 21 Jul 11:42 AM, Florian Fainelli wrote: [..] > > > > This patchset fixes this by calling module_{get,put} in the ethernet driver. > > After this patch, the mvmdio driver is no longer removable: > > > > $ modprobe -r mvmdio > > modprobe: can't unload module mvmdio: Resource temporarily unavailable > > > > Of course, we can expect a few drivers to have the same need and therefore > > we could argue about moving this to be part of the phydev connection. > > Right, that's exactly what jumps to mind when I take a look at your > patch set. As long as a PHY device connected to a particular MDIO bus > is in used, we should make sure its refcount does not hit zero. > Any suggestions about where to do it? I think the right place is after the calls to bus_find_device() in of_phy_find_device() and phy_connect(). > BTW, neither mvmdio nor mvneta seems to set their 'owner' field, is > that intentional? > Actually, I had a patch that did so and then dropped it. The owner is set to unconditionally for plaftorm drivers, so setting it has no effect. See include/linux/platform_device.h: /* * use a macro to avoid include chaining to get THIS_MODULE */ #define platform_driver_register(drv) \ __platform_driver_register(drv, THIS_MODULE) -- Ezequiel GarcĂa, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists