[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5063ab9-643b-15eb-290d-bdfba3b5fd28@free.fr>
Date: Thu, 31 Aug 2017 19:35:05 +0200
From: Mason <slash.tmp@...e.fr>
To: David Daney <ddaney.cavm@...il.com>,
Florian Fainelli <f.fainelli@...il.com>
Cc: Marc Gonzalez <marc_gonzalez@...madesigns.com>,
netdev <netdev@...r.kernel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
David Miller <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>, Mans Rullgard <mans@...sr.com>
Subject: Re: [PATCH net] Revert "net: phy: Correctly process PHY_HALTED in
phy_stop_machine()"
On 31/08/2017 18:36, David Daney wrote:
> On 08/31/2017 05:29 AM, Marc Gonzalez wrote:
>> On 31/08/2017 02:49, Florian Fainelli wrote:
>>
>>> This reverts commit 7ad813f208533cebfcc32d3d7474dc1677d1b09a ("net: phy:
>>> Correctly process PHY_HALTED in phy_stop_machine()") because it is
>>> creating the possibility for a NULL pointer dereference.
>>>
>>> David Daney provide the following call trace and diagram of events:
>>>
>>> When ndo_stop() is called we call:
>>>
>>> phy_disconnect()
>>> +---> phy_stop_interrupts() implies: phydev->irq = PHY_POLL;
>>
>> What does this mean?
>
> I meant that after the call to phy_stop_interrupts(), phydev->irq =
> PHY_POLL;
I must be missing something.
http://elixir.free-electrons.com/linux/latest/source/drivers/net/phy/phy.c#L868
phy_stop_interrupts() doesn't change phydev->irq right?
Only phy_start_interrupts() sets phydev->irq to
PHY_POLL if it cannot set up interrupt mode.
Regards.
Powered by blists - more mailing lists