Thread (6 messages) 6 messages, 3 authors, 2017-08-21

Re: [PATCH 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print

flat view

From: Romain Perier <hidden>
Date: 2017-08-21 11:46:13
Also in: lkml

Hello,


Le 21/08/2017 à 11:45, Sergei Shtylyov a écrit :
Hello!

On 8/21/2017 10:52 AM, Romain Perier wrote:
quoted
Currently, if this logging function is used prior the phy driver is
binded to the phy device (that is usually done from .ndo_open),
   s/binded/bound/.
quoted
'phydev->drv' might be NULL, resulting in a kernel crash. That is
typically the case in the stmmac driver, info about the phy is displayed
during the registration of the MDIO bus, and then genphy driver is
binded
   Likewise.
quoted
to this phydev when .ndo_open is called.

This commit fixes the issue by using the right genphy driver, when
phydev->drv is NULL.

Fixes: commit fbca164776e4 ("net: stmmac: Use the right logging functi")
   "Commit" not needed here.
Fixed, thanks

Romain
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help