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>
This commit is contained in:
Marek Olšák
2015-05-05 20:52:00 +02:00
committed by Alex Deucher
parent f11358daa9
commit 0147ee0f59
3 changed files with 12 additions and 12 deletions

View File

@@ -1056,7 +1056,7 @@ struct amdgpu_ctx_mgr {
struct amdgpu_device *adev;
struct idr ctx_handles;
/* lock for IDR system */
struct mutex hlock;
struct mutex lock;
};
/*