From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v2 1/3] net: phy: xgmiitorgmii: Check phy_driver ready before accessing Date: Thu, 28 Jun 2018 16:12:35 +0900 (KST) Message-ID: <20180628.161235.277685925315349662.davem@davemloft.net> References: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, michal.simek@xilinx.com, clayton.shotwell@rockwellcollins.com, kristopher.cory@rockwellcollins.com, linux-kernel@vger.kernel.org To: brandon.maier@rockwellcollins.com Return-path: In-Reply-To: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Brandon Maier Date: Tue, 26 Jun 2018 12:50:48 -0500 > Since a phy_device is added to the global mdio_bus list during > phy_device_register(), but a phy_device's phy_driver doesn't get > attached until phy_probe(). It's possible of_phy_find_device() in > xgmiitorgmii will return a valid phy with a NULL phy_driver. Leading to > a NULL pointer access during the memcpy(). > > Fixes this Oops: ... > Signed-off-by: Brandon Maier Applied.