public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Romain Perier <romain.perier@collabora.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print
Date: Mon, 21 Aug 2017 13:46:07 +0200	[thread overview]
Message-ID: <8a710dd3-0c84-5e45-28e4-e56be5883e68@collabora.com> (raw)
In-Reply-To: <5c7d444c-427f-7a4d-8603-02bd4dc4b909@cogentembedded.com>

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

  reply	other threads:[~2017-08-21 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21  7:52 [PATCH 0/2] net: stmmac: phy logging fixes Romain Perier
2017-08-21  7:52 ` [PATCH 1/2] net: stmmac: Delete dead code for MDIO registration Romain Perier
2017-08-21  7:52 ` [PATCH 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print Romain Perier
2017-08-21  9:45   ` Sergei Shtylyov
2017-08-21 11:46     ` Romain Perier [this message]
2017-08-21 13:16   ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a710dd3-0c84-5e45-28e4-e56be5883e68@collabora.com \
    --to=romain.perier@collabora.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox