Commit 6300c663 authored by Chris Wilson's avatar Chris Wilson Committed by Joonas Lahtinen

drm/i915/gem: Fix error path to unlock if the GEM context is closed

When inside the lock, remember to unlock even if you want to leave
early.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: a4e7ccda ("drm/i915: Move context management under GEM")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106144155.25727-1-chris@chris-wilson.co.uk
(cherry picked from commit feba2b81)
Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent d29926fa
......@@ -1136,7 +1136,7 @@ static int set_ppgtt(struct drm_i915_file_private *file_priv,
if (i915_gem_context_is_closed(ctx)) {
err = -ENOENT;
goto out;
goto unlock;
}
if (vm == rcu_access_pointer(ctx->vm))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment