FAILED: patch "[PATCH] net/mlx5: DR, Fix freeing in dr_create_rc_qp()" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 47a357de2b6b706af3c9471d5042f9ba8907031e Mon Sep 17 00:00:00 2001
From: Denis Efremov <[email protected]>
Date: Mon, 1 Jun 2020 19:45:26 +0300
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")
Signed-off-by Denis Efremov <[email protected]>
Signed-off-by Saeed Mahameed <[email protected]>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +1 -1
@@ -179,7 +179,7 @@ static struct mlx5dr_qp *dr_create_rc_qp(struct mlx5_core_dev *mdev,MLX5_SET (create_qp_in, in, opcode,MLX5_CMD_OP_CREATE_QP ); err =mlx5_cmd_exec (mdev, in, inlen, out,sizeof (out)); dr_qp->qpn =MLX5_GET (create_qp_out, out, qpn); -kfree (in); +kvfree (in);if (err) goto err_in; dr_qp->uar = attr->uar;