From cc01c3cb5ae708689228d1ec6e751f91e7f90741 Mon Sep 17 00:00:00 2001 From: "monk.liu" Date: Thu, 23 Apr 2015 13:19:57 +0800 Subject: [PATCH] amdgpu: add missing mutex lock/unlock pair MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: monk.liu Reviewed-by: Christian König Signed-off-by: Alex Deucher --- amdgpu/amdgpu_bo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index cbc4cd6c..b4ca7f72 100644 --- a/amdgpu/amdgpu_bo.c +++ b/amdgpu/amdgpu_bo.c @@ -626,8 +626,10 @@ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev, amdgpu_bo_free_internal(bo); return r; } + pthread_mutex_lock(&dev->bo_table_mutex); util_hash_table_set(dev->bo_vas, (void*)(uintptr_t)bo->virtual_mc_base_address, bo); + pthread_mutex_unlock(&dev->bo_table_mutex); info->buf_handle = bo; info->virtual_mc_base_address = bo->virtual_mc_base_address; info->virtual_mc_base_address += off;