Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2527401imm; Thu, 7 Jun 2018 12:09:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIPch2HfwIWg5GZZdX6pJJDqU+6O5xTP/lw0NRVldjAG61Mi5FMx8J9um1jiVKmmR5/U2lP X-Received: by 2002:a65:5546:: with SMTP id t6-v6mr2572352pgr.363.1528398565760; Thu, 07 Jun 2018 12:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528398565; cv=none; d=google.com; s=arc-20160816; b=h2rkXl9J1Y5kBzTSb5OzA7cq8aBjZhEOHNg94UcsO2Cl2IOuzcXiEr847xPxe0bMIY fuWCqRMH3jnQHIj1XKmTo6oFhMEfdnCylM2vu//CWwTQQr5o6UBvgqYkv7QDYmyrZCR3 8MRpXhX7zSAzr/bX3nFUisWp7Gfa8+tpw3l5VHkV+k1EII0bHBBuh9xpOfNJ3NVyyfc4 S+MJ/L6fdszOfBw65Wuq+vG/NETX/NmOy1eEdS3sdWm+D0ejWt+/84L7RrkT+4wW5zEv owEA+QD6iBdqD479mHfayF+BWNoXVwjAz70h9Wgx2k3krayoEoyCLG8TBNnLEqP5vy+J pOQQ== 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=DFqSliE1d59VkcGQ8/8d5sPpBghaT17vmzsZsNh5boo=; b=TzkU14MJnUXmQByr7MAOXS4G5yhJE1v6bkU1REcJwh7LBBcCuq4PEp3eG8BhETG8WJ a32jDI5Itn9nLmtFPLmde1BBSblPMxMCC1e8Fri1ZybhMnlOVwjjqC9cggNYl4gPseeD zIPwJgDVz6rb/WTT6eYqMB5yI8ZPiWnDsonycE0fvLYmpG5gH5avf3YiBKDx56hCZTyA vweFela8dmix/sq3uk5HOGn74AMeTPgdbSLjtH+Suio8HzLMrflrtF6XlTU9StnJXkbX I3t2SV0GWDuPAOWZIII1BDb1wUJxCNKwoPas1m0Igy/Nzh3sDVNt8UINtgmyfjCcVpbt lPuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZG41DjN3; 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 u19-v6si37759701pgv.79.2018.06.07.12.09.11; Thu, 07 Jun 2018 12:09:25 -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=ZG41DjN3; 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 S934063AbeFGSMi (ORCPT + 99 others); Thu, 7 Jun 2018 14:12:38 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:57024 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568AbeFGSMh (ORCPT ); Thu, 7 Jun 2018 14:12:37 -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=DFqSliE1d59VkcGQ8/8d5sPpBghaT17vmzsZsNh5boo=; b=ZG41DjN3ZTGgJ5u0BxsnpjXR5WqndtAbYnXMebGtYgJyvJquYDIWR7aAvceMo9BQmhBcEyKwuzhk1Q5M4xkw7TBTsUq/dmeCrMCLFaz0S0y6p/FNNpw07tByMor/ddXUFJv+ZW9ThHed9y5gKR2AClp0uqI7jEhvQWoEvf+QCkc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1fQzOg-0001xr-18; Thu, 07 Jun 2018 20:12:30 +0200 Date: Thu, 7 Jun 2018 20:12:30 +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 , Kristopher Cory , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] net: phy: Check phy_driver ready before accessing Message-ID: <20180607181230.GF25513@lunn.ch> References: <20180607155348.149665-1-brandon.maier@rockwellcollins.com> <20180607165227.GD25513@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > Agreed. Another thing that looks suspicious to me is the driver > overrides the private data of the device it's attaching too, in the > `priv->phy_dev->priv = priv` bit. Seems like that could cause all > sorts of driver corruption problems. Ah, yes. That is very broken. Many PHYs will just explode sometime later, since they use phdev->priv. > But fixing that is going to require more drastic changes to how this > driver works. So it'd be worth applying this patch in the mean time. Patches welcome. Andrew