Blob Blame History Raw
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Wed, 16 May 2018 17:50:19 -0700
Subject: IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
Patch-mainline: v4.18-rc1
Git-commit: 909d434406f9e7887ffb1ddaff1a7d0da50075b1
References: bsc#1046305 FATE#322943

When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to
free it.

Fixes: 1cbe6fc86ccfe ("IB/mlx5: Add support for CQE compressing")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/hw/mlx5/cq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/hw/mlx5/cq.c
+++ b/drivers/infiniband/hw/mlx5/cq.c
@@ -830,7 +830,7 @@ static int create_cq_user(struct mlx5_ib
 	return 0;
 
 err_cqb:
-	kfree(*cqb);
+	kvfree(*cqb);
 
 err_db:
 	mlx5_ib_db_unmap_user(to_mucontext(context), &cq->db);