]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 17 May 2018 00:50:19 +0000 (17:50 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 17 May 2018 00:50:19 +0000 (17:50 -0700)
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>
drivers/infiniband/hw/mlx5/cq.c

index 77d257ec899be9b5ec23b7489850161a14d52d1c..6d52ea03574e591552de460be15cf22720395a5a 100644 (file)
@@ -849,7 +849,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata,
        return 0;
 
 err_cqb:
-       kfree(*cqb);
+       kvfree(*cqb);
 
 err_db:
        mlx5_ib_db_unmap_user(to_mucontext(context), &cq->db);