This is a note to let you know that I've just added the patch titled vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps() to the 5.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: vdpa-mlx5-restore-cur_num_vqs-in-case-of-failure-in-change_num_qps.patch and it can be found in the queue-5.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 37e07e705888e4c3502f204e9c6785c9c2d6d86a Mon Sep 17 00:00:00 2001 From: Eli Cohen <elic@xxxxxxxxxx> Date: Wed, 5 Jan 2022 13:46:41 +0200 Subject: vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps() From: Eli Cohen <elic@xxxxxxxxxx> 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@xxxxxxxxxx> Acked-by: Jason Wang <jasowang@xxxxxxxxxx> Signed-off-by: Eli Cohen <elic@xxxxxxxxxx> Link: https://lore.kernel.org/r/20220105114646.577224-10-elic@xxxxxxxxxx Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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 @@ -1552,9 +1552,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; } Patches currently in stable-queue which might be from elic@xxxxxxxxxx are queue-5.16/vdpa-mlx5-fix-wrong-configuration-of-virtio_version_1_0.patch queue-5.16/vdpa-mlx5-fix-config_attr_mask-assignment.patch queue-5.16/vdpa-mlx5-restore-cur_num_vqs-in-case-of-failure-in-change_num_qps.patch queue-5.16/net-mlx5e-fix-matching-on-modified-inner-ip_ecn-bits.patch