Skip to content

Commit

Permalink
drm/ttm: Fixed a read/write lock imbalance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Hellstrom committed Nov 26, 2015
1 parent 2f13716 commit 025af18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ttm/ttm_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 025af18

Please sign in to comment.