[Intel-gfx] [PATCH] drm/i915/gem: Fix error path to unlock if the GEM context is closed
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 6 14:41:55 UTC 2019
When inside the lock, remember to unlock even if you want to leave
early.
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index a06cc8e63281..774d71b1ea9b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -1168,7 +1168,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))
--
2.24.0
More information about the Intel-gfx
mailing list