linux/drivers/vdpa
Dan Carpenter cf16fe9243 vdpa: Fix pointer math bug in vdpasim_get_config()
If "offset" is non-zero then we end up copying from beyond the end of
the config because of pointer math.  We can fix this by casting the
struct to a u8 pointer.

Fixes: 2c53d0f64c ("vdpasim: vDPA device simulator")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200406144552.GF68494@mwanda
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
2020-08-10 10:38:55 -04:00
..
ifcvf vdpa: Modify get_vq_state() to return error code 2020-08-05 19:00:23 -04:00
mlx5 vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config() 2020-08-10 09:01:21 -04:00
vdpa_sim vdpa: Fix pointer math bug in vdpasim_get_config() 2020-08-10 10:38:55 -04:00
Kconfig vdpa/mlx5: Add VDPA driver for supported mlx5 devices 2020-08-05 19:00:24 -04:00
Makefile vdpa/mlx5: Add support library for mlx5 VDPA implementation 2020-08-05 19:00:23 -04:00
vdpa.c vdpa: remove hard coded virtq num 2020-08-05 18:39:18 -04:00