summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-17 18:14:57 +0800
committerDavid S. Miller <davem@davemloft.net>2019-07-18 12:11:12 -0700
commit7369c10f81172b55b284944caa2f51f595bbdb84 (patch)
tree75595fcda9e29288d063a6b5f07209958ce02fb8 /drivers
parent184528af92a87e334789f6a22af4e392baf6bf60 (diff)
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. Fixes: 9b1f298236057 ("net/mlx5: Add support for FW fatal reporter dump") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/health.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 2fe6923f7ce0..9314777d99e3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -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;
}