Commit fe37efba authored by Dragos Tatulea's avatar Dragos Tatulea Committed by Michael S. Tsirkin

virtio-vdpa: Fix unchecked call to NULL set_vq_affinity

The referenced patch calls set_vq_affinity without checking if the op is
valid. This patch adds the check.

Fixes: 3dad5682 ("virtio-vdpa: Support interrupt affinity spreading mechanism")
Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
Signed-off-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20230504135053.2283816-1-dtatulea@nvidia.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarFeng Liu <feliu@nvidia.com>
parent ef9da01c
......@@ -385,6 +385,8 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
err = PTR_ERR(vqs[i]);
goto err_setup_vq;
}
if (ops->set_vq_affinity)
ops->set_vq_affinity(vdpa, i, &masks[i]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment