Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
drivers/gpu/drm/vmwgfx/vmwgfx_context.c
··· 117 117 (void) vmw_context_binding_state_kill 118 118 (&container_of(res, struct vmw_user_context, res)->cbs); 119 119 (void) vmw_gb_context_destroy(res); 120 + mutex_unlock(&dev_priv->binding_mutex); 120 121 if (dev_priv->pinned_bo != NULL && 121 122 !dev_priv->query_cid_valid) 122 123 __vmw_execbuf_release_pinned_bo(dev_priv, NULL); 123 - mutex_unlock(&dev_priv->binding_mutex); 124 124 mutex_unlock(&dev_priv->cmdbuf_mutex); 125 125 return; 126 126 }