Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7369c10f authored by Chuhong Yuan's avatar Chuhong Yuan Committed by David S. Miller
Browse files

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: 9b1f2982 ("net/mlx5: Add support for FW fatal reporter dump")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 184528af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}