Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2524204imm; Thu, 7 Jun 2018 12:06:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJQLCpiNnKnue81Z7rAyw4w0Lv0f+hDFm1WjXjK3F2/P172SukAd9u6UPJwqHiWoVaMiml X-Received: by 2002:a63:a553:: with SMTP id r19-v6mr2565825pgu.147.1528398375768; Thu, 07 Jun 2018 12:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528398375; cv=none; d=google.com; s=arc-20160816; b=V6BU9h2e2HejLt8O4atH8shQN+pjuDcimxA+wuRIZwvUSwErFsww3xdibJOYCwvkzX Kn1fp2647KYvz//eKNP25nPLa0KQ384gB9dgefOeikpyhe+zP6lNYSEsP2UnbVp2hP8n vT2VpaZloz55NcnN01pANvINYGIwGxJr7cR6MWL4MSdZCGqxZca+18yZ50xeVQDpYoLS nCeayxPz0+Qlc/kZEcNxT1e40WIc6CX9TifFO2FVuPuy7rCpxeAFYAM8Fh9FluXN51qe 4z8K50LIs7vCR7KXV4KiMz64NdZ6yKF14gbGsSHl0OgiKgyMYX/OUO1dEgFZAGDFNb8N 2I8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=Mo60SZDGatryRdChTYiM4u8iWqGHKK0GiQxeZtr0q8c=; b=nkZ9+Oft29rsv6yMxvSyS0LR9sL0daZEHAV41Wk6UUwqcU1vI5qf7oYsovqXUwNOOB qrqYyh5xb5KiKtxvaxaGoGRyI6H7ahoCbLtqbWJ2ixFFrGwruB8RH+C4mZIRplCgats/ LbZUx6UeI+PmyRBSMI6VdtR886FX8sI0foF74RweOzmK/h+r1oRnZm+rphi6VYNrg+Zb wblu/dv1yXpx5SUs6rzpHXOgNt3U6iz4/4Rm8I/yksfXKBgQcytXY+4Uzj2NQFsjpO6l 4jsMIin/0jYeZkKph3QBQ3nfGme+BzBmhlU9E1xeAroq+AaXLXqMbrC9ldu0DeamzrGc LKtw== 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 q17-v6si12034203pff.173.2018.06.07.12.06.01; Thu, 07 Jun 2018 12:06:15 -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 S934359AbeFGRfG (ORCPT + 99 others); Thu, 7 Jun 2018 13:35:06 -0400 Received: from ch3vs03.rockwellcollins.com ([205.175.226.47]:48978 "EHLO ch3vs03.rockwellcollins.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934131AbeFGRe4 (ORCPT ); Thu, 7 Jun 2018 13:34:56 -0400 X-RC-All-From: , 205.175.226.20, No hostname, brandon.maier@rockwellcollins.com, Brandon Maier , , X-RC-Attachments: , , X-RC-RemoteIP: 205.175.226.20 X-RC-RemoteHost: No hostname X-RC-IP-Hostname: ch3ip03.rockwellcollins.com X-RC-IP-MID: 6434595 X-RC-IP-Group: GOOGLE_RELAYED X-RC-IP-Policy: $GOOGLE_RELAYED X-RC-IP-SBRS: None Received: from unknown (HELO mail-ot0-f198.google.com) ([205.175.226.20]) by ch3vs03.rockwellcollins.com with ESMTP/TLS/AES128-GCM-SHA256; 07 Jun 2018 12:34:55 -0500 Received: by mail-ot0-f198.google.com with SMTP id l95-v6so6639271otl.17 for ; Thu, 07 Jun 2018 10:34:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Mo60SZDGatryRdChTYiM4u8iWqGHKK0GiQxeZtr0q8c=; b=TCo0GFuVgAD0py9vH8lkakoeso6wBL21/LHWkn8i/gbQKxUu4JQTYX2kz614y+hS+d oXCJQqN0E2glOoke5TIyBeaXNwa8DZPYBgbsoRyTaVI9tE9uIYxGJwJUz1QYwjsQ8m+Z NqEGf4MyjreOvk8cZRijp+h9ecdznMGfQUcLSDk6toIuokiRzOVziM/kbeAb6ZDVOBJt jnfaiAMr5twUQp993sEtFoUw1zsG8rcc6Kv3MmvvMfmG7scLsboG6EWup/Yok28H5jD3 Sb47wlPFxFqDnOTpBQC9voCf0HcsDA37uWdTJkWkLjDHUe6FW4KLyddpyDQDpT+1iz3d aoIQ== X-Gm-Message-State: APt69E0eHFTcfmFSfaxg/UiLhWRLpYIYLL5RFCNO9IXobXYAeTu4HvX/ B6Dps4yv+F+sgxAxUvLlL7/flEs+l31Hqy71QvWRp54fs4jkF9yRNa0WkGd6fO17pEZg9PeCogq 8nz79YHvliKIW5agCmfjyluBp8k83Jr8BAvdLsyBTJOW+O5RDy18l4cOBa0Y= X-Received: by 2002:a9d:4d0c:: with SMTP id n12-v6mr1434105otf.203.1528392895235; Thu, 07 Jun 2018 10:34:55 -0700 (PDT) X-Received: by 2002:a9d:4d0c:: with SMTP id n12-v6mr1434089otf.203.1528392894908; Thu, 07 Jun 2018 10:34:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:5fc9:0:0:0:0:0 with HTTP; Thu, 7 Jun 2018 10:34:54 -0700 (PDT) In-Reply-To: <20180607165227.GD25513@lunn.ch> References: <20180607155348.149665-1-brandon.maier@rockwellcollins.com> <20180607165227.GD25513@lunn.ch> From: Brandon Maier Date: Thu, 7 Jun 2018 12:34:54 -0500 Message-ID: Subject: Re: [PATCH 1/3] net: phy: Check phy_driver ready before accessing To: Andrew Lunn 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 7, 2018 at 11:52 AM, Andrew Lunn wrote: > FYI: net-next is closed at the moment. Please resubmit these in two > weeks time. Ah, I didn't see networking/netdev-FAQ.txt. I'll resubmit these then. > I'm sure there are more issues like this in the code. e.g. there is > no attempt made to hold a reference to the child phy. So it could be > unbound. priv->phy_drv->read_status(phydev) is then going to do bad > things. > 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. 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.