net/mlx5: check attr pointer validity before dereferencing it
authorAriel Levkovich <lariel@nvidia.com>
Tue, 16 Aug 2022 20:19:11 +0000 (23:19 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 10 Jan 2023 06:08:33 +0000 (22:08 -0800)
commite0bf81bf0d3d4747c146e0bf44774d3d881d7137
tree37852264ace4aa38937b7336491ee7b2ae2fa38a
parent17b3222e943701c408d6e03357967829aaea0550
net/mlx5: check attr pointer validity before dereferencing it

Fix attr pointer validity checks after it was already
dereferenced.

Fixes: cb0d54cbf948 ("net/mlx5e: Fix wrong source vport matching on tunnel rule")
Signed-off-by: Ariel Levkovich <lariel@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c