]> git.baikalelectronics.ru Git - kernel.git/commit
net: sparx5: Fix get_stat64 crash in tcpdump
authorSteen Hegelund <steen.hegelund@microchip.com>
Thu, 3 Feb 2022 10:29:00 +0000 (11:29 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Feb 2022 03:01:15 +0000 (19:01 -0800)
commit4363cb62cdfb86e76672b35ffdb617ed3fc8b6ce
treeb17f5873c43a48a9257f6f887083ca780dc90d0e
parenta791478757fc57f4fc880472ce2aab23cb433e3d
net: sparx5: Fix get_stat64 crash in tcpdump

This problem was found with Sparx5 when the tcpdump tool requests the
do_get_stats64 (sparx5_get_stats64) statistic.

The portstats pointer was incorrectly incremented when fetching priority
based statistics.

Fixes: 5fe1ac4b0daf (net: sparx5: add ethtool configuration and statistics support)
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Link: https://lore.kernel.org/r/20220203102900.528987-1-steen.hegelund@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c