linux/drivers/vdpa
Eli Cohen f8ae3a489b vdpa/mlx5: Fix is_index_valid() to refer to features
Make sure the decision whether an index received through a callback is
valid or not consults the negotiated features.

The motivation for this was due to a case encountered where I shut down
the VM. After the reset operation was called features were already
clear, I got get_vq_state() call which caused out array bounds
access since is_index_valid() reported the index value.

So this is more of not hit a bug since the call shouldn't have been made
first place.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20220111183400.38418-4-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Si-Wei Liu<si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
2022-01-14 18:50:54 -05:00
..
alibaba vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
ifcvf vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
mlx5 vdpa/mlx5: Fix is_index_valid() to refer to features 2022-01-14 18:50:54 -05:00
vdpa_sim vdpa/vdpa_sim_net: Report max device capabilities 2022-01-14 18:50:54 -05:00
vdpa_user vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
virtio_pci vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
Kconfig eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
Makefile eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
vdpa.c vdpa: Avoid taking cf_mutex lock on get status 2022-01-14 18:50:54 -05:00