diff options
| author | Eli Cohen <[email protected]> | 2022-01-11 18:33:58 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <[email protected]> | 2022-01-14 23:50:54 +0000 |
| commit | 680ab9d69a04cfd9f3f5fedaacbc1974b2959121 (patch) | |
| tree | 04a34fb7783e0e528b3742b2dafe811e99f186a9 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | vdpa: Avoid taking cf_mutex lock on get status (diff) | |
| download | kernel-680ab9d69a04cfd9f3f5fedaacbc1974b2959121.tar.gz kernel-680ab9d69a04cfd9f3f5fedaacbc1974b2959121.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Si-Wei Liu<[email protected]>
Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions
