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: 1d447a39 ('net/mlx5e: Extendable vport representor netdev private data') Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com> Reported-by: NEli Cohen <eli@melloanox.com> Reviewed-by: NEli Cohen <eli@melloanox.com> Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
Showing
想要评论请 注册 或 登录