diff options
author | Roi Dayan <roid@nvidia.com> | 2022-09-22 11:03:30 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-01-18 10:34:08 -0800 |
commit | 2a1f4fed392b2b45e98acf9353a5a3827fb9dde3 (patch) | |
tree | d154b18cdb9cc95f516ae95e855b470bce053d6d | |
parent | ef78b8d5d6f1c311253691f772e2a4d2c96ddde2 (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c b/drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c index 17325c5d6516..cf60f0a3ff23 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c @@ -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); } |