提交 825926d8 编写于 作者: M Maarten Lankhorst 提交者: Daniel Vetter

drm/atomic: Make sure lock is held in trylock contexts.

This will make sure we get a lockdep spat in all cases
even if the context is a complete garbage pointer.
Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 53edb2c6
......@@ -307,6 +307,8 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
WARN_ON(ctx->contended);
if (ctx->trylock_only) {
lockdep_assert_held(&ctx->ww_ctx);
if (!ww_mutex_trylock(&lock->mutex))
return -EBUSY;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册