projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef78b8d
)
net/mlx5e: Warn when destroying mod hdr hash table that is not empty
author
Roi Dayan
<roid@nvidia.com>
Thu, 22 Sep 2022 08:03:30 +0000
(11:03 +0300)
committer
Saeed Mahameed
<saeedm@nvidia.com>
Wed, 18 Jan 2023 18:34:08 +0000
(10:34 -0800)
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>
drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c
patch
|
blob
|
history
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 17325c5d65160548ee86f2b85ab56921f3e74fb6..cf60f0a3ff233e6bca1a17198650f7e627a48f44 100644
(file)
--- 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);
}