]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gem: Fix error path to unlock if the GEM context is closed
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Nov 2019 14:41:55 +0000 (14:41 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Nov 2019 15:46:05 +0000 (15:46 +0000)
When inside the lock, remember to unlock even if you want to leave
early.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106144155.25727-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c

index de6e55af82cf71a49edf2f4b9538d207e6cb2e5d..d49869b1aa10ee2aaa8740e62efe973315c3c527 100644 (file)
@@ -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))