Received: by 10.213.65.68 with SMTP id h4csp876604imn; Wed, 4 Apr 2018 08:43:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Hzgkr0pDhM6Y9JWYuVO3sG374PdFleXTV6vEDuCiL6+w3Q0iLsCb0iOWTFmiiBMXEzcvK X-Received: by 10.99.135.67 with SMTP id i64mr12359129pge.346.1522856610800; Wed, 04 Apr 2018 08:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522856610; cv=none; d=google.com; s=arc-20160816; b=XbWfiFFS7Ex0BanaDK7GgdbZoOUjvIS9Op8WLwy6DkXlbbDjbfHeZFO6QFx/bOnJIo 9DPd0Y+F4pKHzjSIIrMIphupxISzZJUZVKgz1QNQy1cOyXxuyrZx+K0dZ9nFaDeABijN ONqFHLTdsm7V59xaVD3uY9o5xK9F6C5Cgwro+/cfv1r/uofMdQspF2Rtpx379hOFAaoG 5V5fprBUrmrEFokaE7iRBh5rJAJRj2870mU3ffHBjpa792aPVIgqBavGTnepEt9gVI8F 6E3u5nZl3cqkCHafeAEkbGjOYRofJl5I3jaW1UW/1q7p/M3oMg446EeiYRUSdGKrO0nZ LfmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=VsDdwIJtiE5fFATyce8tHbmpqVnDbgTPE28aaOEFe5U=; b=IbU5/rjr+YZkjAUQ0ocBciyyoUjDaVXruQq2Le2PZMciYjBVElu+/jZSSBExm2MozO lEuHzsMjd5Yksm6yTezKXNsB0sFwSLgsibSBWOZaB49A3Y5lki3duwLnUF4GGf+knRjw ryEXw2LkAylROzXcX7yatQcqRCoGKhvhmVfWF84U92ggTzxlvTTYwLTIQQdt8OU54HnB 8za7jlFm3E4+kVt/XzaCNpP6ti94h4U3oM6smZCJ614f2tCFtJkKrbgBIoE4p24C5oMx VrN1E4gKyDGqwh+jVITCCTMOZvQwheEgmaup8BC9yaamRfYQGEWhaO0+I8DufegCt/Cd 60EA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h33-v6si5727137plh.483.2018.04.04.08.43.16; Wed, 04 Apr 2018 08:43:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751973AbeDDPmA (ORCPT + 99 others); Wed, 4 Apr 2018 11:42:00 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:40442 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780AbeDDPl7 (ORCPT ); Wed, 4 Apr 2018 11:41:59 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E7B0F108649C2; Wed, 4 Apr 2018 08:41:57 -0700 (PDT) Date: Wed, 04 Apr 2018 11:41:56 -0400 (EDT) Message-Id: <20180404.114156.2277005234997416804.davem@davemloft.net> To: agraf@suse.de 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 Subject: Re: [PATCH v2] lan78xx: Connect phy early From: David Miller In-Reply-To: <20180403221935.51099-1-agraf@suse.de> References: <20180403221935.51099-1-agraf@suse.de> X-Mailer: Mew version 6.7 on Emacs 25.3 / 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]); Wed, 04 Apr 2018 08:41:58 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.