[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124184128.895154057@linuxfoundation.org>
Date: Mon, 24 Jan 2022 19:45:28 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Si-Wei Liu <si-wei.liu@...cle.com>,
Jason Wang <jasowang@...hat.com>, Eli Cohen <elic@...dia.com>,
"Michael S. Tsirkin" <mst@...hat.com>
Subject: [PATCH 5.15 811/846] vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()
From: Eli Cohen <elic@...dia.com>
commit 37e07e705888e4c3502f204e9c6785c9c2d6d86a upstream.
Restore ndev->cur_num_vqs to the original value in case change_num_qps()
fails.
Fixes: 52893733f2c5 ("vdpa/mlx5: Add multiqueue support")
Reviewed-by: Si-Wei Liu<si-wei.liu@...cle.com>
Acked-by: Jason Wang <jasowang@...hat.com>
Signed-off-by: Eli Cohen <elic@...dia.com>
Link: https://lore.kernel.org/r/20220105114646.577224-10-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1510,9 +1510,11 @@ static int change_num_qps(struct mlx5_vd
return 0;
clean_added:
- for (--i; i >= cur_qps; --i)
+ for (--i; i >= 2 * cur_qps; --i)
teardown_vq(ndev, &ndev->vqs[i]);
+ ndev->cur_num_vqs = 2 * cur_qps;
+
return err;
}
Powered by blists - more mailing lists