summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2012-06-01 15:39:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-10 00:36:14 +0900
commit71a47b9b18398fb55ab48865c0886a5b0ded6253 (patch)
treeb1d4208ec72ac337878c977fa99614bdae5bfab9 /drivers
parent888e4b9df23905c6e29e6f26727349c3a81da844 (diff)
downloadlinux-3.10-71a47b9b18398fb55ab48865c0886a5b0ded6253.tar.gz
linux-3.10-71a47b9b18398fb55ab48865c0886a5b0ded6253.tar.bz2
linux-3.10-71a47b9b18398fb55ab48865c0886a5b0ded6253.zip
drm/ttm: Fix spinlock imbalance
commit a8ff3ee211fccf708e1911bbc096625453ebf759 upstream. This imbalance may cause hangs when TTM is trying to swap out a buffer that is already on the delayed delete list. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 1f5c67c579c..18434186ed1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1821,6 +1821,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
spin_unlock(&glob->lru_lock);
(void) ttm_bo_cleanup_refs(bo, false, false, false);
kref_put(&bo->list_kref, ttm_bo_release_list);
+ spin_lock(&glob->lru_lock);
continue;
}