diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2018-01-18 07:54:07 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-01-19 00:14:32 +0300 |
commit | ad76c65ec39f20139885ecd4e5830f2c2a643dcb (patch) | |
tree | ab56885a0f12f07714e80e92a2c1b040cd93ecdd /drivers/gpu/drm/ttm/ttm_bo.c | |
parent | fd5002d6a3c602664b07668a24df4ef7a43bf078 (diff) | |
download | linux-ad76c65ec39f20139885ecd4e5830f2c2a643dcb.tar.xz |
drm/ttm: Don't unreserve swapped BOs that were previously reserved
If ttm_bo_swapout doesn't own the lock, don't release it. Someone
else probably depends on it still being locked.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 62518b669ca1..893003fc76a1 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1780,8 +1780,8 @@ out: * Unreserve without putting on LRU to avoid swapping out an * already swapped buffer. */ - - reservation_object_unlock(bo->resv); + if (locked) + reservation_object_unlock(bo->resv); kref_put(&bo->list_kref, ttm_bo_release_list); return ret; } |