[PATCH 3.13.y-ckt 026/108] drm/ttm: Fixed a read/write lock imbalance

2016-01-22 Thread Kamal Mostafa
3.13.11-ckt33 -stable review patch.  If anyone has any objections, please let 
me know.

---8<

From: Thomas Hellstrom 

commit 025af189fb44250206dd8a32fa4a682392af3301 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: Thomas Hellstrom 
Reviewed-by: Sinclair Yeh 
Signed-off-by: Kamal Mostafa 
---
 drivers/gpu/drm/ttm/ttm_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c
index 3daa9a3..9b7cb11 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);
}
} else
-   wait_event(lock->queue, __ttm_read_lock(lock));
+   wait_event(lock->queue, __ttm_write_lock(lock));
 
return ret;
 }
-- 
1.9.1



[PATCH 3.13.y-ckt 026/108] drm/ttm: Fixed a read/write lock imbalance

2016-01-22 Thread Kamal Mostafa
3.13.11-ckt33 -stable review patch.  If anyone has any objections, please let 
me know.

---8<

From: Thomas Hellstrom 

commit 025af189fb44250206dd8a32fa4a682392af3301 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: Thomas Hellstrom 
Reviewed-by: Sinclair Yeh 
Signed-off-by: Kamal Mostafa 
---
 drivers/gpu/drm/ttm/ttm_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c
index 3daa9a3..9b7cb11 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);
}
} else
-   wait_event(lock->queue, __ttm_read_lock(lock));
+   wait_event(lock->queue, __ttm_write_lock(lock));
 
return ret;
 }
-- 
1.9.1