On Thu, Sep 9, 2021 at 2:37 PM Eli Cohen <elic@xxxxxxxxxx> wrote: > > Avoid executing set_vq_ready() if the device has been reset. In such > case, the features are cleared and cannot be used in conditional > statements. Such reference happens is the function ctrl_vq_idx(). > > Fixes: 9c90709cf8e7 ("vdpa/mlx5: Add multiqueue support") > Signed-off-by: Eli Cohen <elic@xxxxxxxxxx> Acked-by: Jason Wang <jasowang@xxxxxxxxxx> > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 64dfd0f500d2..bd56de7484dc 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -1714,6 +1714,9 @@ static void mlx5_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx, bool ready > struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); > struct mlx5_vdpa_virtqueue *mvq; > > + if (!mvdev->actual_features) > + return; > + > if (!is_index_valid(mvdev, idx)) > return; > > -- > 2.32.0 > _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization