Commit 23fe87e5 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Luis Henriques

drm/ttm: Fixed a read/write lock imbalance

commit 025af189 upstream.

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.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent bfba4ace
...@@ -180,7 +180,7 @@ int ttm_write_lock(struct ttm_lock *lock, bool interruptible) ...@@ -180,7 +180,7 @@ int ttm_write_lock(struct ttm_lock *lock, bool interruptible)
spin_unlock(&lock->lock); spin_unlock(&lock->lock);
} }
} else } else
wait_event(lock->queue, __ttm_read_lock(lock)); wait_event(lock->queue, __ttm_write_lock(lock));
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