[dpdk-stable] [PATCH v2] [18.11] net/mlx5: fix xstats reset reinitialization
Kevin Traynor
ktraynor at redhat.com
Tue Dec 8 14:39:10 CET 2020
On 08/12/2020 12:48, Viacheslav Ovsiienko wrote:
> From: Shiri Kuzin <shirik at nvidia.com>
>
> [ upstream commit 42dcd453d9b63841a5460a6ca3872eb7648d73bd ]
>
> The mlx5_xstats_reset clears the device extended statistics.
> In this function the driver may reinitialize the structures
> that are used to read device counters.
>
> In case of reinitialization, the number of counters may
> change, which wouldn't be taken into account by the
> reset API callback and can cause a segmentation fault.
>
> This issue is fixed by allocating the counters size after
> the reinitialization.
>
> Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics")
>
> Reported-by: Ralf Hoffmann <ralf.hoffmann at allegro-packets.com>
> Signed-off-by: Shiri Kuzin <shirik at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
> drivers/net/mlx5/mlx5_stats.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
Applied, thanks.
More information about the stable
mailing list