From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbdHVVtd (ORCPT ); Tue, 22 Aug 2017 17:49:33 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:44954 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303AbdHVVtc (ORCPT ); Tue, 22 Aug 2017 17:49:32 -0400 Date: Tue, 22 Aug 2017 14:49:30 -0700 (PDT) Message-Id: <20170822.144930.499626528600927895.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, romain.perier@collabora.com, alexandre.torgue@st.com, peppe.cavallaro@st.com, plaes@plaes.org, andrew@lunn.ch, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: phy: Deal with unbound PHY driver in phy_attached_print() From: David Miller In-Reply-To: <24d4774e-1b1b-fe8b-5d25-dcd7f7aae757@gmail.com> References: <20170822212647.11520-1-f.fainelli@gmail.com> <20170822.144414.545771080170074088.davem@davemloft.net> <24d4774e-1b1b-fe8b-5d25-dcd7f7aae757@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 22 Aug 2017 14:49:31 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli Date: Tue, 22 Aug 2017 14:45:44 -0700 > On 08/22/2017 02:44 PM, David Miller wrote: >> From: Florian Fainelli >> Date: Tue, 22 Aug 2017 14:26:47 -0700 >> >>> Priit reported that stmmac was crashing with the trace below. This is because >>> phy_attached_print() is called too early right after the PHY device has been >>> found, but before it has a driver attached, since that is only done in >>> phy_probe() which occurs later. >>> >>> Fix this by dealing with a possibly NULL phydev->drv point since that can >>> happen here, but could also happen if we voluntarily did an unbind of the >>> PHY device with the PHY driver. >> ... >>> Tested-By: Priit Laes >>> Fixes: fbca164776e4 ("net: stmmac: Use the right logging function in stmmac_mdio_register") >>> Signed-off-by: Florian Fainelli >> >> "net-next"? The commit which introduced this problem is in 'net', don't we want >> to fix it there? > > Oh yes we do, somehow I thought the commit was just in "net-next" hence > the subject, the patch applies cleanly to "net" as well. I thought so, thanks for clarifying. Applied.