aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/fw.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2018-06-04 19:46:53 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2018-06-26 15:26:28 -0700
commit8ffd569aaa818f2624ca821d9a246342fa8b8c50 (patch)
tree52ee0b4ae3905008b928fa24c52fe72f7cb95606 /drivers/net/ethernet/mellanox/mlx5/core/fw.c
parentLinux 4.18-rc1 (diff)
downloadlinux-dev-8ffd569aaa818f2624ca821d9a246342fa8b8c50.tar.xz
linux-dev-8ffd569aaa818f2624ca821d9a246342fa8b8c50.zip
net/mlx5e: Don't attempt to dereference the ppriv struct if not being eswitch manager
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: 1d447a39142e ('net/mlx5e: Extendable vport representor netdev private data') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reported-by: Eli Cohen <eli@melloanox.com> Reviewed-by: Eli Cohen <eli@melloanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fw.c')
0 files changed, 0 insertions, 0 deletions