[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200623195352.943802344@linuxfoundation.org>
Date: Tue, 23 Jun 2020 21:58:08 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Denis Efremov <efremov@...ux.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.4 293/314] net/mlx5: DR, Fix freeing in dr_create_rc_qp()
From: Denis Efremov <efremov@...ux.com>
[ Upstream commit 47a357de2b6b706af3c9471d5042f9ba8907031e ]
Variable "in" in dr_create_rc_qp() is allocated with kvzalloc() and
should be freed with kvfree().
Fixes: 297cccebdc5a ("net/mlx5: DR, Expose an internal API to issue RDMA operations")
Cc: stable@...r.kernel.org
Signed-off-by: Denis Efremov <efremov@...ux.com>
Signed-off-by: Saeed Mahameed <saeedm@...lanox.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
index 7c77378accf04..f012aac83b10e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
@@ -181,7 +181,7 @@ static struct mlx5dr_qp *dr_create_rc_qp(struct mlx5_core_dev *mdev,
in, pas));
err = mlx5_core_create_qp(mdev, &dr_qp->mqp, in, inlen);
- kfree(in);
+ kvfree(in);
if (err) {
mlx5_core_warn(mdev, " Can't create QP\n");
--
2.25.1
Powered by blists - more mailing lists