Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7263610imm; Thu, 28 Jun 2018 00:18:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeCPu76lHzX1iWKwjvOOCPXCo/sClqUuOTySdVJUhN54lgZTd23yw7LdocjsP0NHbAdDLUC X-Received: by 2002:aa7:808f:: with SMTP id v15-v6mr9056627pff.38.1530170325564; Thu, 28 Jun 2018 00:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530170325; cv=none; d=google.com; s=arc-20160816; b=UWg7sojIuBD/B4El9I50mRlNgUmXWkVbo4dYGN56IaeJ6iXMmV58PkBjfgpncu/aIs B6PHAnp+RpnTusSv1LrDoKmsVfIthzE7zZLrM84AyKUFJ49P9ggOjhcxvfnsKmpQwQhF /E6CjoA0lvUiQJUTfGjikVE7Hk3SpcmhLNpK3C3aOWlXtI0HawZ4oF9dB2ypB0kJzrXf s0/5Bs0mmiI5jIqD3iGCw/0MUNuk0YOjNzEbl3c8Q1Is0GRwzwkjIUM/7i+8oGhAhMII u3EG8hkPawz4o8xR20hUTISZGppVhlebgkD1hON/mzZJa29pcYty0rqQhT6qII4RFecW 7hZQ== 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=8QR2KFfZU/FJPq0n/EDwIC4rR0zBrh6c/dxVlCks1co=; b=zTX9hTLXqqL7jfJaixefA4Xb3nTaM3OpCzQQ6XKI2+uQyyLP78MZiAD5jyy4pjwW+4 Y/CQ0IFiwJa48tyyf61E7xmaSHINWknIrjdf3DtoXwrNtWrInAfZTbhy0J5E3bp8Nblc pzUnSYBfYBcOtyXnAlLMjfJFg78Js1NwqHXmxpXifMMP00OBnRcFe6QxJhSOoqCz51j7 RqG1Y63qhvq/VP5T3EahwSGKjH7PfeRIeojEGDHKDOXpjJ5Cb8NMsPZxyzsbf34C0ylJ yy5LtlxnjGLd36iLj+rmNNekakOLH8MpLng2k3fjVkKhFygh+rnaPvQnZo8+eFM+oUKZ bf4w== 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 g11-v6si5120176pgq.457.2018.06.28.00.18.31; Thu, 28 Jun 2018 00:18:45 -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 S1753466AbeF1HMn (ORCPT + 99 others); Thu, 28 Jun 2018 03:12:43 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:46902 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbeF1HMl (ORCPT ); Thu, 28 Jun 2018 03:12:41 -0400 Received: from localhost (unknown [211.196.191.92]) (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 87C3310177610; Thu, 28 Jun 2018 00:12:38 -0700 (PDT) Date: Thu, 28 Jun 2018 16:12:35 +0900 (KST) Message-Id: <20180628.161235.277685925315349662.davem@davemloft.net> To: brandon.maier@rockwellcollins.com 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 Subject: Re: [PATCH net-next v2 1/3] net: phy: xgmiitorgmii: Check phy_driver ready before accessing From: David Miller In-Reply-To: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> References: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> X-Mailer: Mew version 6.7 on Emacs 26 / 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]); Thu, 28 Jun 2018 00:12:41 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.