On 02/01/2017 02:51 AM, Russell King - ARM Linux wrote: > It looks to me as if that's the only case where this can happen, so maybe > the above needs to be: > > if (phydev->drv && phydev->drv->link_change_notify) > phydev->drv->link_change_notify(phydev); > > Also, I'd suggest making sure that the workqueue is flushed in > phy_remove() after setting phydev->drv to NULL to ensure that the > workqueue isn't running while the phy driver is being unbound, which > should also make module removal safe(r). I haven't fully analysed > that though.
I suspect nobody has actually ever tested that, because it's pretty badly broken at the moment... working on it. -- Florian