summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorAlan Liu <HaoPing.Liu@amd.com>2022-10-24 14:15:30 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-10-27 15:12:08 -0400
commit7117007edad2299f2f093cdcfa813beb646d913e (patch)
tree333ea2c96cd279ff27f86cf62694c813b6872f59 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parent1ed0e176902483e67cd02530d387a7551b0e99a4 (diff)
drm/amdgpu: Move the mutex_lock to protect the return status of securedisplay command buffer
[Why] Before we call psp_securedisplay_invoke(), we call psp_prep_securedisplay_cmd_buf() to prepare and initialize the command buffer. However, we didn't use the mutex_lock to protect the status of command buffer. So when multiple threads are using the command buffer, after thread A return from psp_securedisplay_invoke() and the command buffer status is set to SUCCESS, another thread B may call psp_prep_securedisplay_cmd_buf() and initialize the status to FAILURE again, and cause Thread A to get a failure return status. [How] Move the mutex_lock out of psp_securedisplay_invoke() to its caller to cover psp_prep_securedisplay_cmd_buf() and the code checking the return status of command buffer. Signed-off-by: Alan Liu <HaoPing.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
0 files changed, 0 insertions, 0 deletions