From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2] lan78xx: Connect phy early Date: Wed, 04 Apr 2018 11:41:56 -0400 (EDT) Message-ID: <20180404.114156.2277005234997416804.davem@davemloft.net> References: <20180403221935.51099-1-agraf@suse.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Nisar.Sayed@microchip.com, Woojung.Huh@microchip.com, UNGLinuxDriver@microchip.com, tbogendoerfer@suse.de, phil@raspberrypi.org, andrew@lunn.ch, RaghuramChary.Jallipalli@microchip.com To: agraf@suse.de Return-path: In-Reply-To: <20180403221935.51099-1-agraf@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Alexander Graf Date: Wed, 4 Apr 2018 00:19:35 +0200 > When using wicked with a lan78xx device attached to the system, we > end up with ethtool commands issued on the device before an ifup > got issued. That lead to the following crash: > ... > The culprit is quite simple: The driver tries to access the phy left and right, > but only actually has a working reference to it when the device is up. > > The fix thus is quite simple too: Get a reference to the phy on probe already > and keep it even when the device is going down. > > With this patch applied, I can successfully run wicked on my system and bring > the interface up and down as many times as I want, without getting NULL pointer > dereferences in between. > > Signed-off-by: Alexander Graf Applied, thank you.