summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-05-05 21:52:00 +0300
committerAlex Deucher <alexander.deucher@amd.com>2015-06-04 04:03:27 +0300
commit0147ee0f5921af606ac0f822107b69b53dd29358 (patch)
treea922251df2e25ab013a3c15501da6322cf800341 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parentf11358daa93a8ae9fdee5cfe6ef7a0ed0027edee (diff)
downloadlinux-0147ee0f5921af606ac0f822107b69b53dd29358.tar.xz
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 <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
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;