LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Brandon Maier <brandon.maier@rockwellcollins.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, f.fainelli@gmail.com,
	davem@davemloft.net, michal.simek@xilinx.com,
	Clayton Shotwell <clayton.shotwell@rockwellcollins.com>,
	Kristopher Cory <kristopher.cory@rockwellcollins.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] net: phy: Check phy_driver ready before accessing
Date: Thu, 7 Jun 2018 12:34:54 -0500	[thread overview]
Message-ID: <CA+fik51YC14k8yMLRkybMXQNn6uWB0u6aQUd1GMZrQtOF=cd3A@mail.gmail.com> (raw)
In-Reply-To: <20180607165227.GD25513@lunn.ch>

On Thu, Jun 7, 2018 at 11:52 AM, Andrew Lunn <andrew@lunn.ch> 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.

  reply	other threads:[~2018-06-07 17:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 15:53 Brandon Maier
2018-06-07 15:53 ` [PATCH 2/3] net: phy: xgmiitorgmii: Use correct mdio bus Brandon Maier
2018-06-07 16:49   ` Andrew Lunn
2018-06-07 17:37     ` Brandon Maier
2018-06-07 15:53 ` [PATCH 3/3] net: phy: xgmiitorgmii: Check read_status results Brandon Maier
2018-06-07 16:43   ` Andrew Lunn
2018-06-07 16:52 ` [PATCH 1/3] net: phy: Check phy_driver ready before accessing Andrew Lunn
2018-06-07 17:34   ` Brandon Maier [this message]
2018-06-07 18:12     ` Andrew Lunn
2018-06-07 16:54 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+fik51YC14k8yMLRkybMXQNn6uWB0u6aQUd1GMZrQtOF=cd3A@mail.gmail.com' \
    --to=brandon.maier@rockwellcollins.com \
    --cc=andrew@lunn.ch \
    --cc=clayton.shotwell@rockwellcollins.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kristopher.cory@rockwellcollins.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH 1/3] net: phy: Check phy_driver ready before accessing' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).