mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
net/mlx5e: Warn when destroying mod hdr hash table that is not empty
To avoid memory leaks add a warn when destroying mod hdr hash table but the hash table is not empty. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
ef78b8d5d6
commit
2a1f4fed39
|
|
@ -47,6 +47,7 @@ void mlx5e_mod_hdr_tbl_init(struct mod_hdr_tbl *tbl)
|
|||
|
||||
void mlx5e_mod_hdr_tbl_destroy(struct mod_hdr_tbl *tbl)
|
||||
{
|
||||
WARN_ON(!hash_empty(tbl->hlist));
|
||||
mutex_destroy(&tbl->lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user