Commit 73a88e4c authored by Christian König's avatar Christian König

drm/ttm: fix busy reference in ttm_mem_evict_first

The busy BO might actually be already deleted,
so grab only a list reference.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarThomas Hellström <thellstrom@vmware.com>
Link: https://patchwork.freedesktop.org/patch/332877/
parent 78e31c42
...@@ -878,11 +878,11 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev, ...@@ -878,11 +878,11 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
if (!bo) { if (!bo) {
if (busy_bo) if (busy_bo)
ttm_bo_get(busy_bo); kref_get(&busy_bo->list_kref);
spin_unlock(&glob->lru_lock); spin_unlock(&glob->lru_lock);
ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket); ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
if (busy_bo) if (busy_bo)
ttm_bo_put(busy_bo); kref_put(&busy_bo->list_kref, ttm_bo_release_list);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment