]> git.baikalelectronics.ru Git - kernel.git/commit
aquantia: Fix "ethtool -S" crash when adapter down.
authorPavel Belous <pavel.belous@aquantia.com>
Thu, 4 May 2017 20:10:56 +0000 (23:10 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 May 2017 16:53:12 +0000 (12:53 -0400)
commita2cfb099dfe84a5c5394a731cb8dfa28654cd8fb
treed2eb1ac976efbc325b45480cff63d7196c6a1bce
parent7f2afed22ffc415330cb4a2962b548d03a9cea9e
aquantia: Fix "ethtool -S" crash when adapter down.

This patch fixes the crash that happens when driver tries to collect statistics
from already released "aq_vec" object.
If adapter is in "down" state we still allow user to see statistics from HW.

V2: fixed braces around "aq_vec_free".

Fixes: a7d1aad5cd72 ("net: ethernet: aquantia: Support for NIC-specific code")
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Tested-by: David Arcari <darcari@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_nic.c