diff options
| author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-10-22 08:51:25 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2012-10-22 20:15:17 -0400 |
| commit | 7bc17a7837bf4ec8fd2d63438c0b6b0160c454c1 (patch) | |
| tree | a50f3d05f4cad2a8678bc452d9f535ab2d4e890b /drivers/gpu | |
| parent | a16d4f86019a72b3e8cbb89abff769b25b53ab69 (diff) | |
drm/ttm: Fix a theoretical race
The ttm_mem_evict_first function could theoretically drop the
lru lock without retrying if a reservation from off the LRU list
ended up waiting.
However, since currently there are no users that could cause a wait
in that situation so this is not suitable for stable
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
| -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 402ab69f9f99..d42631cade5a 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -817,11 +817,11 @@ retry: | |||
| 817 | goto retry; | 817 | goto retry; |
| 818 | } | 818 | } |
| 819 | 819 | ||
| 820 | ret = ttm_bo_reserve_locked(bo, false, no_wait_reserve, false, 0); | 820 | ret = ttm_bo_reserve_locked(bo, false, true, false, 0); |
| 821 | 821 | ||
| 822 | if (unlikely(ret == -EBUSY)) { | 822 | if (unlikely(ret == -EBUSY)) { |
| 823 | spin_unlock(&glob->lru_lock); | 823 | spin_unlock(&glob->lru_lock); |
| 824 | if (likely(!no_wait_gpu)) | 824 | if (likely(!no_wait_reserve)) |
| 825 | ret = ttm_bo_wait_unreserved(bo, interruptible); | 825 | ret = ttm_bo_wait_unreserved(bo, interruptible); |
| 826 | 826 | ||
| 827 | kref_put(&bo->list_kref, ttm_bo_release_list); | 827 | kref_put(&bo->list_kref, ttm_bo_release_list); |
