diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2014-03-31 04:20:30 -0400 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2014-04-03 03:31:37 -0400 |
commit | c8e5e010ef12df6707a1d711a5279a22f67a355e (patch) | |
tree | 10d6c6f066e2d7e8d00502f11f059bb80f4b6c52 /drivers/gpu/drm/vmwgfx | |
parent | 2844ea3f252331cc0ecf3ae74f6226db2f580f8a (diff) |
drm/vmwgfx: Fix query buffer locking order violation
The query buffers were reserved while holding the binding mutex, which
caused a circular locking dependency.
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c index 701d5207def6..8bb26dcd9eae 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c | |||
@@ -117,10 +117,10 @@ static void vmw_hw_context_destroy(struct vmw_resource *res) | |||
117 | (void) vmw_context_binding_state_kill | 117 | (void) vmw_context_binding_state_kill |
118 | (&container_of(res, struct vmw_user_context, res)->cbs); | 118 | (&container_of(res, struct vmw_user_context, res)->cbs); |
119 | (void) vmw_gb_context_destroy(res); | 119 | (void) vmw_gb_context_destroy(res); |
120 | mutex_unlock(&dev_priv->binding_mutex); | ||
120 | if (dev_priv->pinned_bo != NULL && | 121 | if (dev_priv->pinned_bo != NULL && |
121 | !dev_priv->query_cid_valid) | 122 | !dev_priv->query_cid_valid) |
122 | __vmw_execbuf_release_pinned_bo(dev_priv, NULL); | 123 | __vmw_execbuf_release_pinned_bo(dev_priv, NULL); |
123 | mutex_unlock(&dev_priv->binding_mutex); | ||
124 | mutex_unlock(&dev_priv->cmdbuf_mutex); | 124 | mutex_unlock(&dev_priv->cmdbuf_mutex); |
125 | return; | 125 | return; |
126 | } | 126 | } |