Skip to contentSkip to conversation

drm/ttm: Fixed a read/write lock imbalance

PATCH New Sinclair Yeh 1 participant 1 message Nov 20, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: Fixed a read/write lock imbalance

From: Thomas Hellstrom <[email protected]>

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.

---
 drivers/gpu/drm/ttm/ttm_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_lock.c +1 -1
index 6a95454..f154fb1 100644
@@ -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;
 }
Signature · 1 line
1.9.1