Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5513801imm; Tue, 26 Jun 2018 12:38:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKWCFLYEJ4Xq99DS3w5Ym1iYNrYUyF6GqVhpBdweeoPkFkTzMOReYq6k6czRiHaGxCGMRg1 X-Received: by 2002:a63:66c4:: with SMTP id a187-v6mr2510709pgc.167.1530041902819; Tue, 26 Jun 2018 12:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530041902; cv=none; d=google.com; s=arc-20160816; b=a6vYEVkW6w+jtqkOz9AJbrRh9JacccHRAxa2A++uRD+ji4jgepqJTGvEFfRW4kDG/R F/ZjgS8ypvv5O2ANXVLK8r4zaCBUDSka1QkLYWm1XplraMJM0/zcavKQ1dvl2GPhgx6T 1DcR0IgwysCTWyUm/Vs8wydRCocis5OEPZuPuqN+IsUp7FEm060nO6v8nIiFPXIY3Ruz 5lh8rBbgxhlfEUgyGLlNLPNqdqMbCr7V1ceTUr7M0AX1tsXgUN3m7lML7jL7fdOMcy+O 41BmuBN1DNVXV/SvMYpXZNirPuqTo5lL4m729mpVwh5FI9Dub8Hd3R4sQ5lG2gWR0kFz Vyhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=mFlibdxjbMbDxgt6YIjvFqciEuAlXlaD6+pE5ujpsTw=; b=HWWSYJUhINgC4NrzQTzitPkS8n3YNVxKIYpoivg9eYUJUxSiwDNJXBqb+209pUWDez WOLgaJmqQgHVPbSzw2Wgy9vKoBZIFFCiTSetF9tjt5JHyTllf1bPqbipo+CK/qxvCKIh N3rMGT4LX3ZTkj/hA4qM1oFCFQRMmu0cCiUiICaaBLj7BDCWWaohIcZbEwyKmBjMcdYb 7uLsa0hGcEbq/ulE2TtAML+Z0bWT1HlySdCmLy3u/krpRP750gNZXxxC68B+yh012Bvq fTJ3//pWokhPismSj6fokopbi4xhzuoWG+HE+/Tv7TzVzQ9+j9rax5RXJE2w0UCcNRro 4N1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="lPA4y/An"; 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 e2-v6si1904657pgr.167.2018.06.26.12.38.08; Tue, 26 Jun 2018 12:38:22 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="lPA4y/An"; 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 S932205AbeFZTgp (ORCPT + 99 others); Tue, 26 Jun 2018 15:36:45 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:43716 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeFZTgo (ORCPT ); Tue, 26 Jun 2018 15:36:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=mFlibdxjbMbDxgt6YIjvFqciEuAlXlaD6+pE5ujpsTw=; b=lPA4y/AnvMC8KTGq2nrBd0cXMfkocvUjkSJScdoUGDftkiYFrMQNGisOlrXpGKUbtndKAW78mixt4nvsvmPMeFpLsp5uyO3AkIDPuNOsE6JAyLPrdXepL1DlSJgHIP73GQUwo2pC/L6W8Koz7nb0qjWKKg5JmqT7+3NQSF8ykNY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1fXtlU-0004Hr-BA; Tue, 26 Jun 2018 21:36:36 +0200 Date: Tue, 26 Jun 2018 21:36:36 +0200 From: Andrew Lunn To: Brandon Maier Cc: netdev@vger.kernel.org, f.fainelli@gmail.com, davem@davemloft.net, 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 Message-ID: <20180626193636.GC9800@lunn.ch> References: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626175050.71165-1-brandon.maier@rockwellcollins.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 26, 2018 at 12:50:48PM -0500, Brandon Maier wrote: > 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(). > Signed-off-by: Brandon Maier Reviewed-by: Andrew Lunn Andrew