linux-stable/drivers/vhost
Eli Cohen 680ab9d69a vdpa: Protect vdpa reset with cf_mutex
Call reset using the wrapper function vdpa_reset() to make sure the
operation is serialized with cf_mutex.

This comes to protect from the following possible scenario:

vhost_vdpa_set_status() could call the reset op. Since the call is not
protected by cf_mutex, a netlink thread calling vdpa_dev_config_fill
could get passed the VIRTIO_CONFIG_S_FEATURES_OK check in
vdpa_dev_config_fill() and end up reporting wrong features.

Fixes: 5f6e85953d8f ("vdpa: Read device configuration only if FEATURES_OK")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20220111183400.38418-3-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
..
iotlb.c
Kconfig
Makefile
net.c
scsi.c
test.c vhost/test: fix memory leak of vhost virtqueues 2022-01-14 18:50:53 -05:00
test.h
vdpa.c vdpa: Protect vdpa reset with cf_mutex 2022-01-14 18:50:54 -05:00
vhost.c
vhost.h
vringh.c
vsock.c vhost/vsock: cleanup removing len variable 2021-11-24 19:00:28 -05:00