Skip to content

Commit b100573

Browse files
Chris MiSaeed Mahameed
authored andcommitted
net/mlx5e: TC, Add null pointer check for hardware miss support
The cited commits add hardware miss support to tc action. But if the rules can't be offloaded, the pointers are null and system will panic when accessing them. Fix it by checking null pointer. Fixes: 08fe94e ("net/mlx5e: TC, Remove special handling of CT action") Fixes: 6702782 ("net/mlx5e: TC, Set CT miss to the specific ct action instance") Signed-off-by: Chris Mi <[email protected]> Reviewed-by: Paul Blakey <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 0ab999d commit b100573

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+2
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,8 @@ void
20212021
mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *priv,
20222022
struct mlx5_flow_attr *attr)
20232023
{
2024+
if (!attr->ct_attr.ft) /* no ct action, return */
2025+
return;
20242026
if (!attr->ct_attr.nf_ft) /* means only ct clear action, and not ct_clear,ct() */
20252027
return;
20262028

0 commit comments

Comments
 (0)