Skip to content

Commit fe5c2d3

Browse files
kliteynSaeed Mahameed
authored andcommitted
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: da5d002 ("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>
1 parent c4c24fc commit fe5c2d3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core/steering

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ptrn.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ struct mlx5dr_ptrn_mgr *mlx5dr_ptrn_mgr_create(struct mlx5dr_domain *dmn)
213213
}
214214

215215
INIT_LIST_HEAD(&mgr->ptrn_list);
216+
mutex_init(&mgr->modify_hdr_mutex);
217+
216218
return mgr;
217219

218220
free_mgr:
@@ -237,5 +239,6 @@ void mlx5dr_ptrn_mgr_destroy(struct mlx5dr_ptrn_mgr *mgr)
237239
}
238240

239241
mlx5dr_icm_pool_destroy(mgr->ptrn_icm_pool);
242+
mutex_destroy(&mgr->modify_hdr_mutex);
240243
kfree(mgr);
241244
}

0 commit comments

Comments
 (0)