diff options
author | Christian König <christian.koenig@amd.com> | 2015-06-03 21:31:20 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-05 10:59:32 -0400 |
commit | 9298e52f8b51d1e4acd68f502832f3a97f8cf892 (patch) | |
tree | 050267683a1abd4a50b5520a891eb7ae97ab45cc /drivers/gpu/drm | |
parent | 25f45e633892a45df2edbfd4a5dbbfc70e32487b (diff) | |
download | linux-next-9298e52f8b51d1e4acd68f502832f3a97f8cf892.tar.gz |
drm/amdgpu: fix user ptr race condition
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: monk liu <monk.liu@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index ad5b9c676fd8..e8409fea4bf1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -37,6 +37,7 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj) if (robj) { if (robj->gem_base.import_attach) drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg); + amdgpu_mn_unregister(robj); amdgpu_bo_unref(&robj); } } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 7d801e016e31..8da64245b31b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -95,7 +95,6 @@ static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo) bo = container_of(tbo, struct amdgpu_bo, tbo); amdgpu_update_memory_usage(bo->adev, &bo->tbo.mem, NULL); - amdgpu_mn_unregister(bo); mutex_lock(&bo->adev->gem.mutex); list_del_init(&bo->list); |