Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b216867c authored by Or Gerlitz's avatar Or Gerlitz Committed by Greg Kroah-Hartman
Browse files

net/mlx5e: Don't attempt to dereference the ppriv struct if not being eswitch manager



[ Upstream commit 8ffd569aaa818f2624ca821d9a246342fa8b8c50 ]

The check for cpu hit statistics was not returning immediate false for
any non vport rep netdev and hence we crashed (say on mlx5 probed VFs) if
user-space tool was calling into any possible netdev in the system.

Fix that by doing a proper check before dereferencing.

Fixes: 1d447a39 ('net/mlx5e: Extendable vport representor netdev private data')
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reported-by: default avatarEli Cohen <eli@melloanox.com>
Reviewed-by: default avatarEli Cohen <eli@melloanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d8dda44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment