RE: [net] net: phy: Fix lack of reference count on PHY driver

2017-02-08 Thread maowenan
: [net] net: phy: Fix lack of reference count on PHY driver > > On Wed, Feb 08, 2017 at 04:03:43PM +, Robin Murphy wrote: > > Hi all, > > > > We're seeing a new boot-time crash[1] on SMSC911x hardware from this > > patch in today's HEAD (as cafe8df8b9bc)..

Re: [net] net: phy: Fix lack of reference count on PHY driver

2017-02-08 Thread Robin Murphy
Hi all, We're seeing a new boot-time crash[1] on SMSC911x hardware from this patch in today's HEAD (as cafe8df8b9bc)... On 01/02/17 02:46, Florian Fainelli wrote: > From: Mao Wenan > > There is currently no reference count being held on the PHY driver, > which makes it possible to remove the PH

Re: [net] net: phy: Fix lack of reference count on PHY driver

2017-02-08 Thread Andrew Lunn
On Wed, Feb 08, 2017 at 04:03:43PM +, Robin Murphy wrote: > Hi all, > > We're seeing a new boot-time crash[1] on SMSC911x hardware from this > patch in today's HEAD (as cafe8df8b9bc)... Hi Robin Thank for the report. See the discussion on netdev under the subject "Kernel crashes in phy_attac

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-03 Thread Florian Fainelli
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 do

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-03 Thread Russell King - ARM Linux
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\ et

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-02 Thread David Miller
From: Florian Fainelli Date: Thu, 2 Feb 2017 19:47:43 -0800 > Le 02/02/17 à 18:54, David Miller a écrit : >> From: Florian Fainelli >> Date: Tue, 31 Jan 2017 18:46:43 -0800 >> >>> From: Mao Wenan >>> >>> There is currently no reference count being held on the PHY driver, >>> which makes it pos

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-02 Thread Florian Fainelli
Le 02/02/17 à 18:54, David Miller a écrit : > From: Florian Fainelli > Date: Tue, 31 Jan 2017 18:46:43 -0800 > >> From: Mao Wenan >> >> 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

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-02 Thread David Miller
From: Florian Fainelli Date: Tue, 31 Jan 2017 18:46:43 -0800 > From: Mao Wenan > > 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

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread Florian Fainelli
On 02/01/2017 11:10 AM, Russell King - ARM Linux wrote: > On Wed, Feb 01, 2017 at 01:59:38PM -0500, David Miller wrote: >> From: Florian Fainelli >> Date: Wed, 1 Feb 2017 10:55:46 -0800 >> >>> You are right, but there is still a fundamental problem IMHO in that you >>> should not be able to rmmod

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread Florian Fainelli
On 02/01/2017 02:51 AM, Russell King - ARM Linux wrote: > It looks to me as if that's the only case where this can happen, so maybe > the above needs to be: > > if (phydev->drv && phydev->drv->link_change_notify) > phydev->drv->link_change_notify(phydev); > > Also, I'd sug

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread Russell King - ARM Linux
On Wed, Feb 01, 2017 at 01:59:38PM -0500, David Miller wrote: > From: Florian Fainelli > Date: Wed, 1 Feb 2017 10:55:46 -0800 > > > You are right, but there is still a fundamental problem IMHO in that you > > should not be able to rmmod a PHY driver as long as a network device is > > attached to

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread David Miller
From: Florian Fainelli Date: Wed, 1 Feb 2017 10:55:46 -0800 > You are right, but there is still a fundamental problem IMHO in that you > should not be able to rmmod a PHY driver as long as a network device is > attached to the PHY, and if the PHY driver is attached from several > different networ

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread Florian Fainelli
On 02/01/2017 02:51 AM, Russell King - ARM Linux wrote: > On Wed, Feb 01, 2017 at 10:22:08AM +, Russell King - ARM Linux wrote: >> On Tue, Jan 31, 2017 at 06:46:43PM -0800, Florian Fainelli wrote: >>> From: Mao Wenan >>> >>> There is currently no reference count being held on the PHY driver, >

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread Russell King - ARM Linux
On Wed, Feb 01, 2017 at 10:22:08AM +, Russell King - ARM Linux wrote: > On Tue, Jan 31, 2017 at 06:46:43PM -0800, Florian Fainelli wrote: > > From: Mao Wenan > > > > There is currently no reference count being held on the PHY driver, > > which makes it possible to remove the PHY driver module

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-01 Thread Russell King - ARM Linux
On Tue, Jan 31, 2017 at 06:46:43PM -0800, Florian Fainelli wrote: > From: Mao Wenan > > 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 cras

[PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-01-31 Thread Florian Fainelli
From: Mao Wenan 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: [ 43.361162] BUG: unable to handle ke