Thread (8 messages) flat view 8 messages, 4 authors, 2018-09-20

Re: [PATCH net-next 1/2] net: linkwatch: add check for netdevice being present to linkwatch_do_dev

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2018-09-20 05:43:38

On 09/18/2018 12:55 PM, Heiner Kallweit wrote:
When bringing down the netdevice (incl. detaching it) and calling
netif_carrier_off directly or indirectly the latter triggers an
asynchronous linkwatch event.
This linkwatch event eventually may fail to access chip registers in
the ndo_get_stats/ndo_get_stats64 callback because the device isn't
accessible any longer, see call trace in [0].

To prevent this scenario don't check for IFF_UP only, but also make
sure that the netdevice is present.

[0] https://lists.openwall.net/netdev/2018/03/15/62

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks Heiner!
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help