Commit fe5c2d3a authored by Yevgeny Kliteynik's avatar Yevgeny Kliteynik Committed by Saeed Mahameed

net/mlx5: DR, Add missing mutex init/destroy in pattern manager

Add missing mutex init/destroy as caught by the lock's debug warning:
 DEBUG_LOCKS_WARN_ON(lock->magic != lock)

Fixes: da5d0027 ("net/mlx5: DR, Add cache for modify header pattern")
Signed-off-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent c4c24fc3
...@@ -213,6 +213,8 @@ struct mlx5dr_ptrn_mgr *mlx5dr_ptrn_mgr_create(struct mlx5dr_domain *dmn) ...@@ -213,6 +213,8 @@ struct mlx5dr_ptrn_mgr *mlx5dr_ptrn_mgr_create(struct mlx5dr_domain *dmn)
} }
INIT_LIST_HEAD(&mgr->ptrn_list); INIT_LIST_HEAD(&mgr->ptrn_list);
mutex_init(&mgr->modify_hdr_mutex);
return mgr; return mgr;
free_mgr: free_mgr:
...@@ -237,5 +239,6 @@ void mlx5dr_ptrn_mgr_destroy(struct mlx5dr_ptrn_mgr *mgr) ...@@ -237,5 +239,6 @@ void mlx5dr_ptrn_mgr_destroy(struct mlx5dr_ptrn_mgr *mgr)
} }
mlx5dr_icm_pool_destroy(mgr->ptrn_icm_pool); mlx5dr_icm_pool_destroy(mgr->ptrn_icm_pool);
mutex_destroy(&mgr->modify_hdr_mutex);
kfree(mgr); kfree(mgr);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment