mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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: da5d0027d6 ("net/mlx5: DR, Add cache for modify header pattern")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
c4c24fc30c
commit
fe5c2d3aef
@@ -213,6 +213,8 @@ struct mlx5dr_ptrn_mgr *mlx5dr_ptrn_mgr_create(struct mlx5dr_domain *dmn)
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&mgr->ptrn_list);
|
||||
mutex_init(&mgr->modify_hdr_mutex);
|
||||
|
||||
return mgr;
|
||||
|
||||
free_mgr:
|
||||
@@ -237,5 +239,6 @@ void mlx5dr_ptrn_mgr_destroy(struct mlx5dr_ptrn_mgr *mgr)
|
||||
}
|
||||
|
||||
mlx5dr_icm_pool_destroy(mgr->ptrn_icm_pool);
|
||||
mutex_destroy(&mgr->modify_hdr_mutex);
|
||||
kfree(mgr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user