aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c
diff options
context:
space:
mode:
authorChristian Borntraeger <[email protected]>2017-12-22 09:54:20 +0000
committerChristian Borntraeger <[email protected]>2018-01-24 14:22:51 +0000
commit1de1ea7efeb9e8543212210e34518b4049ccd285 (patch)
tree0057ad8dc61f521d48a02caa2708e2e7a76cb6a7 /drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c
parentKVM: s390: prevent buffer overrun on memory hotplug during migration (diff)
downloadkernel-1de1ea7efeb9e8543212210e34518b4049ccd285.tar.gz
kernel-1de1ea7efeb9e8543212210e34518b4049ccd285.zip
KVM: s390: add proper locking for CMMA migration bitmap
Some parts of the cmma migration bitmap is already protected with the kvm->lock (e.g. the migration start). On the other hand the read of the cmma bits is not protected against a concurrent free, neither is the emulation of the ESSA instruction. Let's extend the locking to all related ioctls by using the slots lock for - kvm_s390_vm_start_migration - kvm_s390_vm_stop_migration - kvm_s390_set_cmma_bits - kvm_s390_get_cmma_bits In addition to that, we use synchronize_srcu before freeing the migration structure as all users hold kvm->srcu for read. (e.g. the ESSA handler). Reported-by: David Hildenbrand <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Cc: [email protected] # 4.13+ Fixes: 190df4a212a7 (KVM: s390: CMMA tracking, ESSA emulation, migration mode) Reviewed-by: Claudio Imbrenda <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Cornelia Huck <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c')
0 files changed, 0 insertions, 0 deletions