Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750776AbcL1Ccx (ORCPT ); Tue, 27 Dec 2016 21:32:53 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:57190 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbcL1Ccw (ORCPT ); Tue, 27 Dec 2016 21:32:52 -0500 Date: Tue, 27 Dec 2016 21:32:44 -0500 (EST) Message-Id: <20161227.213244.1031537802471524150.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, pavel@ucw.cz, Joao.Pinto@synopsys.com, seraphin.bonnaffe@st.com, alexandre.torgue@gmail.com, manabian@gmail.com, niklas.cassel@axis.com, johan@kernel.org, boon.leong.ong@intel.com, weifeng.voon@intel.com, lars.persson@axis.com, linux-kernel@vger.kernel.org, peppe.cavallaro@st.com, alexandre.torgue@st.com Subject: Re: [PATCH net] net: stmmac: Fix race between stmmac_drv_probe and stmmac_open From: David Miller In-Reply-To: <20161228022306.14442-1-f.fainelli@gmail.com> References: <20161228022306.14442-1-f.fainelli@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.1 / 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, 27 Dec 2016 17:33:33 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 743 Lines: 16 From: Florian Fainelli Date: Tue, 27 Dec 2016 18:23:06 -0800 > There is currently a small window during which the network device registered by > stmmac can be made visible, yet all resources, including and clock and MDIO bus > have not had a chance to be set up, this can lead to the following error to > occur: ... > Fix this by making sure that register_netdev() is the last thing being done, > which guarantees that the clock and the MDIO bus are available. > > Fixes: 4bfcbd7abce2 ("stmmac: Move the mdio_register/_unregister in probe/remove") > Reported-by: Kweh, Hock Leong > Signed-off-by: Florian Fainelli Applied and queued up for -stable, thanks Florian.