[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5COWf8Ojw=nF5JXv54AweK17sBAb+aYk7VCOoMcj1t8kQ@mail.gmail.com>
Date: Wed, 8 Feb 2017 14:46:13 -0200
From: Fabio Estevam <festevam@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>,
Russell King <rmk+kernel@...linux.org.uk>, maowenan@...wei.com
Subject: Re: [PATCH net v2 1/3] net: phy: Fix PHY module checks
On Wed, Feb 8, 2017 at 5:37 AM, Florian Fainelli <f.fainelli@...il.com> wrote:
> The Generic PHY drivers gets assigned after we checked that the current PHY
> driver is NULL, so we need to check a few things before we can safely
> derference d->driver. Update phy_attach_direct() and phy_detach() accordingly
> to be resilient to these cases.
>
> Even though the Generic PHY driver defaults to phy_probe() which can hardly
> fail at the moment, let's fix the label so we don't call phy_detach() on a
> network device we have not attached yet.
>
> Fixes: cafe8df8b9bc ("net: phy: Fix lack of reference count on PHY driver")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
This fixes the kernel crash:
Tested-by: Fabio Estevam <fabio.estevam@....com>
Powered by blists - more mailing lists