From: Chuhong Yuan Date: Wed, 17 Jul 2019 10:14:57 +0000 (+0800) Subject: net/mlx5: Replace kfree with kvfree X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7369c10f81172b55b284944caa2f51f595bbdb84;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Saeed Mahameed Signed-off-by: David S. Miller --- 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; }