Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716356

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

From Romain Perier <romain.perier@collabora.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print
Date 2017-08-21 13:50 +0200
Message-ID <ugTnr-3Rl-1@gated-at.bofh.it> (permalink)
References <ugPMS-1su-15@gated-at.bofh.it> <ugPMS-1su-25@gated-at.bofh.it> <ugRvk-2Gw-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,


Le 21/08/2017 à 11:45, Sergei Shtylyov a écrit :
> Hello!
>
> On 8/21/2017 10:52 AM, Romain Perier wrote:
>
>> 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/.
>
>> '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.
>
>> 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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print Romain Perier <romain.perier@collabora.com> - 2017-08-21 10:00 +0200
  Re: [PATCH 2/2] net: phy: Don't use drv when it is NULL in  phy_attached_print Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-08-21 11:50 +0200
    Re: [PATCH 2/2] net: phy: Don't use drv when it is NULL in  phy_attached_print Romain Perier <romain.perier@collabora.com> - 2017-08-21 13:50 +0200
  Re: [PATCH 2/2] net: phy: Don't use drv when it is NULL in  phy_attached_print Andrew Lunn <andrew@lunn.ch> - 2017-08-21 15:20 +0200

csiph-web