All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net/mlx5: use kvfree() for kvzalloc() in mlx5_ct_fs_smfs_matcher_create
@ 2022-04-20 10:36 Ziyang Xuan
  2022-04-26 20:06 ` Saeed Mahameed
  0 siblings, 1 reply; 2+ messages in thread
From: Ziyang Xuan @ 2022-04-20 10:36 UTC (permalink / raw)
  To: saeedm, leon, davem, kuba, pabeni, paulb, netdev, linux-rdma

The memory of spec is allocated with kvzalloc(), the corresponding
release function should not be kfree(), use kvfree() instead.

Generated by: scripts/coccinelle/api/kfree_mismatch.cocci

Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
index 59988e24b704..b979826f3f6c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
@@ -100,7 +100,7 @@ mlx5_ct_fs_smfs_matcher_create(struct mlx5_ct_fs *fs, struct mlx5dr_table *tbl,
 	spec->match_criteria_enable = MLX5_MATCH_MISC_PARAMETERS_2 | MLX5_MATCH_OUTER_HEADERS;
 
 	dr_matcher = mlx5_smfs_matcher_create(tbl, priority, spec);
-	kfree(spec);
+	kvfree(spec);
 	if (!dr_matcher)
 		return ERR_PTR(-EINVAL);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/mlx5: use kvfree() for kvzalloc() in mlx5_ct_fs_smfs_matcher_create
  2022-04-20 10:36 [PATCH net] net/mlx5: use kvfree() for kvzalloc() in mlx5_ct_fs_smfs_matcher_create Ziyang Xuan
@ 2022-04-26 20:06 ` Saeed Mahameed
  0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2022-04-26 20:06 UTC (permalink / raw)
  To: Ziyang Xuan; +Cc: saeedm, leon, davem, kuba, pabeni, paulb, netdev, linux-rdma

On 20 Apr 18:36, Ziyang Xuan wrote:
>The memory of spec is allocated with kvzalloc(), the corresponding
>release function should not be kfree(), use kvfree() instead.
>
>Generated by: scripts/coccinelle/api/kfree_mismatch.cocci
>
>Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>

applied to net-next-mlx5, thanks !



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-26 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 10:36 [PATCH net] net/mlx5: use kvfree() for kvzalloc() in mlx5_ct_fs_smfs_matcher_create Ziyang Xuan
2022-04-26 20:06 ` Saeed Mahameed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.