All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, andrew@lunn.ch,
	rmk+kernel@armlinux.org.uk, maowenan@huawei.com
Subject: Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver
Date: Thu, 2 Feb 2017 19:47:43 -0800	[thread overview]
Message-ID: <26bbf22a-8d2b-00a0-d509-0c1651e3b1f3@gmail.com> (raw)
In-Reply-To: <20170202.215407.606581158337251076.davem@davemloft.net>

Le 02/02/17 à 18:54, David Miller a écrit :
> From: Florian Fainelli <f.fainelli@gmail.com>
> Date: Tue, 31 Jan 2017 18:46:43 -0800
> 
>> From: Mao Wenan <maowenan@huawei.com>
>>
>> There is currently no reference count being held on the PHY driver,
>> which makes it possible to remove the PHY driver module while the PHY
>> state machine is running and polling the PHY. This could cause crashes
>> similar to this one to show up:
>  ...
>> Keep references on the PHY driver module right before we are going to
>> utilize it in phy_attach_direct(), and conversely when we don't use it
>> anymore in phy_detach().
>>
>> Signed-off-by: Mao Wenan <maowenan@huawei.com>
>> [florian: rebase, rework commit message]
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> I think grabbing the module reference is the only easy fix we
> can do for now.
> 
> Hot plugging PHYs and notifications and all of that business is
> net-next material.
> 
> Florian, do you need to respin this with the workqueue or whatever
> suggestion Russell made?

That seems to deserve a separate fix of its own it seems, because it
becomes tangential to this particular problem.
-- 
Florian

  reply	other threads:[~2017-02-03  3:47 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 [this message]
2017-02-03  4:00     ` David Miller
2017-02-03  9:54   ` Russell King - ARM Linux
2017-02-03 21:04     ` Florian Fainelli
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=26bbf22a-8d2b-00a0-d509-0c1651e3b1f3@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=maowenan@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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.