Skip to content

Commit

Permalink
drm/i915/gt: Use the correct err_unlock unwind path for a closed context
Browse files Browse the repository at this point in the history
A silly cut'n'paste copied the unlocked error path and used it inside
the pin_mutex lock, we need to drop that lock before returning.

Fixes: b412c63 ("drm/i915/gt: Report context-is-closed prior to pinning")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200322123241.17694-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Mar 22, 2020
1 parent b412c63 commit bb6892b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gt/intel_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int __intel_context_do_pin(struct intel_context *ce)

if (unlikely(intel_context_is_closed(ce))) {
err = -ENOENT;
goto out_release;
goto out_unlock;
}

if (likely(!atomic_add_unless(&ce->pin_count, 1, 0))) {
Expand Down

0 comments on commit bb6892b

Please sign in to comment.