drm/i915: unlock on error in i915_ppgtt_info()
Subsystems (3)
PATCH 1/1 drm/i915: unlock on error in i915_ppgtt_info()
We need to call intel_runtime_pm_put() and mutex_unlock() before returning.
Fixes 7cb5dff8d59d ('drm/i915: fix task reference leak in i915_debugfs.c')
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/i915/i915_debugfs.c +6 -3
@@ -2294,18 +2294,21 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)struct task_struct *task; task =get_pid_task (file->pid,PIDTYPE_PID ); -if (!task) -return -ESRCH ; +if (!task) { + ret = -ESRCH ; + goto out_put; + }seq_printf (m,"\nproc: %s\n" , task->comm);put_task_struct (task);idr_for_each (&file_priv->context_idr, per_file_ctx, (void *)(unsigned long )m); } +out_put:intel_runtime_pm_put (dev_priv);mutex_unlock (&dev->struct_mutex); -return 0 ; +return ret; }static int count_irq_waiters (struct drm_i915_private *i915)
Quoted 5 lines · Dan Carpenter
We need to call
intel_runtime_pm_put()andmutex_unlock()before returning.Fixes 7cb5dff8d59d ('drm/i915: fix task reference leak in i915_debugfs.c')Signed-off-by Dan Carpenter <[email protected]>
Acked-by Geliang Tang <[email protected]>
Daniel Vetter
AppliedQuoted 8 lines · Geliang Tang
Quoted 5 lines · Dan Carpenter
We need to call
intel_runtime_pm_put()andmutex_unlock()before returning.Fixes 7cb5dff8d59d ('drm/i915: fix task reference leak in i915_debugfs.c')Signed-off-by Dan Carpenter <[email protected]>Acked-by Geliang Tang <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel