summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_lock.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2015-11-20 22:43:50 +0300
committerThomas Hellstrom <thellstrom@vmware.com>2015-11-26 17:47:38 +0300
commit025af189fb44250206dd8a32fa4a682392af3301 (patch)
tree93faacb2ab517087da07341fc4b2fadb4eb6674c /drivers/gpu/drm/ttm/ttm_lock.c
parent2f1371614a5d49428846b90673a89036518dffad (diff)
downloadlinux-025af189fb44250206dd8a32fa4a682392af3301.tar.xz
drm/ttm: Fixed a read/write lock imbalance
In ttm_write_lock(), the uninterruptible path should call __ttm_write_lock() not __ttm_read_lock(). This fixes a vmwgfx hang on F23 start up. syeh: Extracted this from one of Thomas' internal patches. Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_lock.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c
index 6a954544727f..f154fb1929bd 100644
--- a/drivers/gpu/drm/ttm/ttm_lock.c
+++ b/drivers/gpu/drm/ttm/ttm_lock.c
@@ -180,7 +180,7 @@ int ttm_write_lock(struct ttm_lock *lock, bool interruptible)
spin_unlock(&lock->lock);
}
} else
- wait_event(lock->queue, __ttm_read_lock(lock));
+ wait_event(lock->queue, __ttm_write_lock(lock));
return ret;
}