All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>,
	David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, maowenan@huawei.com
Subject: Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver
Date: Fri, 3 Feb 2017 13:04:40 -0800	[thread overview]
Message-ID: <88fb901e-47e3-698b-d111-7e965ca6760a@gmail.com> (raw)
In-Reply-To: <20170203095427.GA27312@n2100.armlinux.org.uk>

On 02/03/2017 01:54 AM, Russell King - ARM Linux wrote:
> On Thu, Feb 02, 2017 at 09:54:07PM -0500, David Miller wrote:
>> Hot plugging PHYs and notifications and all of that business is
>> net-next material.
> 
> I was talking more about unbinding of the driver, which is something
> that can be done today, eg:
> 
> $ ls -l /sys/bus/mdio_bus/drivers/Atheros\ 8035\ ethernet/
> total 0
> lrwxrwxrwx 1 root root    0 Feb  3 09:49 2188000.ethernet:00 -> ../../../../devices/soc0/soc/2100000.aips-bus/2188000.ethernet/mdio_bus/2188000.ethernet/2188000.ethernet:00
> --w------- 1 root root 4096 Feb  3 09:49 bind
> --w------- 1 root root 4096 Feb  3 09:49 uevent
> --w------- 1 root root 4096 Feb  3 09:49 unbind
> $ echo 2188000.ethernet:00 > /sys/bus/mdio_bus/drivers/Atheros\ 8035\ ethernet/unbind
> 
> is all it takes, and the same oops will happen.  Try it on a box
> you don't care about crashing. :)
> 
> This is my point - locking the module into the kernel using
> try_module_get() doesn't actually fix the problem where drivers are
> concerned, it just has the illusion of being safe.

I have some patches for that too, along with making bind, unbind work
again, because the state machine seems to be hosed (another thing that
was very well tested...).
-- 
Florian

  reply	other threads:[~2017-02-03 21:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01  2:46 [PATCH net] net: phy: Fix lack of reference count on PHY driver Florian Fainelli
2017-02-01 10:22 ` Russell King - ARM Linux
2017-02-01 10:51   ` Russell King - ARM Linux
2017-02-01 18:55     ` Florian Fainelli
2017-02-01 18:59       ` David Miller
2017-02-01 19:10         ` Russell King - ARM Linux
2017-02-02  2:56           ` Florian Fainelli
2017-02-02  2:55     ` Florian Fainelli
2017-02-03  2:54 ` David Miller
2017-02-03  3:47   ` Florian Fainelli
2017-02-03  4:00     ` David Miller
2017-02-03  9:54   ` Russell King - ARM Linux
2017-02-03 21:04     ` Florian Fainelli [this message]
2017-02-08 16:03 ` [net] " Robin Murphy
2017-02-08 16:23   ` Andrew Lunn
2017-02-09  1:01     ` maowenan

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=88fb901e-47e3-698b-d111-7e965ca6760a@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=linux@armlinux.org.uk \
    --cc=maowenan@huawei.com \
    --cc=netdev@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.