Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1499552 > unrolled thread

[PATCH 3.4 065/125] drm/ttm: Fixed a read/write lock imbalance

Started bylizf@kernel.org
First post2016-10-12 14:50 +0200
Last post2016-10-13 05:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.4 065/125] drm/ttm: Fixed a read/write lock imbalance lizf@kernel.org - 2016-10-12 14:50 +0200
    Re: [PATCH 3.4 065/125] drm/ttm: Fixed a read/write lock imbalance Zefan Li <lizefan@huawei.com> - 2016-10-13 05:00 +0200

#1499552 — [PATCH 3.4 065/125] drm/ttm: Fixed a read/write lock imbalance

Fromlizf@kernel.org
Date2016-10-12 14:50 +0200
Subject[PATCH 3.4 065/125] drm/ttm: Fixed a read/write lock imbalance
Message-ID<srr8S-4rr-21@gated-at.bofh.it>
From: Thomas Hellstrom <thellstrom@vmware.com>

3.4.113-rc1 review patch.  If anyone has any objections, please let me know.

------------------


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 <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
---
 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 075daf4..9934b4d 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;
 }
-- 
1.9.1

[toc] | [next] | [standalone]


#1500006

FromZefan Li <lizefan@huawei.com>
Date2016-10-13 05:00 +0200
Message-ID<srEpr-5zA-7@gated-at.bofh.it>
In reply to#1499552
On 2016/10/12 21:04, Thomas Hellstrom wrote:
> Li,
> 
> IIRC This one goes hand in hand with a vmwgfx (the only user) patch.
> Please don't apply until I've figured out whether that patch is also in 3.4.
> 

I'll drop it for now. Thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web