aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2016-09-15 22:47:52 +0200
committerDavid S. Miller <davem@davemloft.net>2016-09-17 10:18:02 -0400
commit37dd348270c1a48f0234354a06c0ce052b6c85b1 (patch)
treefa6a649dcac23bdcc511fc41413ae9a5ef9e0a16 /drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
parentbna: add missing per queue ethtool stat (diff)
downloadlinux-dev-37dd348270c1a48f0234354a06c0ce052b6c85b1.tar.xz
linux-dev-37dd348270c1a48f0234354a06c0ce052b6c85b1.zip
bna: fix crash in bnad_get_strings()
Commit 6e7333d "net: add rx_nohandler stat counter" added the new entry rx_nohandler into struct rtnl_link_stats64. Unfortunately the bna driver foolishly depends on the structure. It uses part of it for ethtool statistics and it's not bad but the driver assumes its size is constant as it defines string for each existing entry. The problem occurs when the structure is extended because you need to modify bna driver as well. If not any attempt to retrieve ethtool statistics results in crash in bnad_get_strings(). The patch changes BNAD_ETHTOOL_STATS_NUM so it counts real number of strings in the array and also removes rtnl_link_stats64 entries that are not used in output and are always zero. Fixes: 6e7333d "net: add rx_nohandler stat counter" Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c')
0 files changed, 0 insertions, 0 deletions