aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-05-05 18:52:00 +0000
committerAlex Deucher <[email protected]>2015-06-04 01:03:27 +0000
commit0147ee0f5921af606ac0f822107b69b53dd29358 (patch)
treea922251df2e25ab013a3c15501da6322cf800341 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parentdrm/amdgpu: remove unsafe context releasing (diff)
downloadkernel-0147ee0f5921af606ac0f822107b69b53dd29358.tar.gz
kernel-0147ee0f5921af606ac0f822107b69b53dd29358.zip
drm/amdgpu: make the CTX ioctl thread-safe
The existing locks were protecting the list, but not the elements. v2: rename hlock to lock Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 2d50c6dbdcbb..02c450d0be1a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -497,7 +497,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
idr_init(&fpriv->bo_list_handles);
/* init context manager */
- mutex_init(&fpriv->ctx_mgr.hlock);
+ mutex_init(&fpriv->ctx_mgr.lock);
idr_init(&fpriv->ctx_mgr.ctx_handles);
fpriv->ctx_mgr.adev = adev;