net/mlx5: Replace kfree with kvfree
Subsystems (4)
PATCH 1/1 net/mlx5: Replace kfree with kvfree
Variable allocated by kvmalloc should not be freed by kfree. Because it may be allocated by vmalloc.
So replace kfree with kvfree here.
Signed-off-by Chuhong Yuan <[email protected]>
--- drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/health.c +1 -1
@@ -597,7 +597,7 @@ mlx5_fw_fatal_reporter_dump(struct devlink_health_reporter *reporter, err =devlink_fmsg_arr_pair_nest_end (fmsg); free_data: -kfree (cr_data); +kvfree (cr_data);return err; }
Signature · 1 line
2.20.1
Quoted 6 lines · Chuhong Yuan
Variable allocated by kvmalloc should not be freed by kfree. Because it may be allocated by vmalloc.
So replace kfree with kvfree here.Signed-off-by Chuhong Yuan <[email protected]>---
Please add corresponding Fixes: tag, thanks !
Quoted 17 lines
drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/health.c +1
-1@@ -597,7 +597,7 @@ mlx5_fw_fatal_reporter_dump(struct devlink_health_reporter *reporter, err =devlink_fmsg_arr_pair_nest_end (fmsg); free_data: -kfree (cr_data); +kvfree (cr_data);return err; }