[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200601164526.19430-1-efremov@linux.com>
Date: Mon, 1 Jun 2020 19:45:26 +0300
From: Denis Efremov <efremov@...ux.com>
To: "David S. Miller" <davem@...emloft.net>,
Saeed Mahameed <saeedm@...lanox.com>,
Leon Romanovsky <leon@...nel.org>,
Alex Vesker <valex@...lanox.com>
Cc: Denis Efremov <efremov@...ux.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: [PATCH] net/mlx5: DR, Fix freeing in dr_create_rc_qp()
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>
---
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 18719acb7e54..eff8bb64899d 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.26.2
Powered by blists - more mailing lists