diff options
author | Ivan Vecera <ivecera@redhat.com> | 2016-09-15 22:47:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-17 10:18:02 -0400 |
commit | 37dd348270c1a48f0234354a06c0ce052b6c85b1 (patch) | |
tree | fa6a649dcac23bdcc511fc41413ae9a5ef9e0a16 /kernel | |
parent | 2835d2d9e366a2985b24051d228333bfba82f3a7 (diff) | |
download | linux-37dd348270c1a48f0234354a06c0ce052b6c85b1.tar.bz2 |
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 'kernel')
0 files changed, 0 insertions, 0 deletions