Commit b0212486 authored by Wei Yongjun's avatar Wei Yongjun Committed by Daniel Vetter

drm/i915: Fix missing unlock on error in i915_ppgtt_info()

Add the missing unlock before return from function i915_ppgtt_info()
in the error handling case.

Fixes: 1d2ac403(drm: Protect dev->filelist with its own mutex)
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465861320-26221-1-git-send-email-weiyj_lk@163.com
parent c02726ff
...@@ -2393,16 +2393,16 @@ static int i915_ppgtt_info(struct seq_file *m, void *data) ...@@ -2393,16 +2393,16 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
task = get_pid_task(file->pid, PIDTYPE_PID); task = get_pid_task(file->pid, PIDTYPE_PID);
if (!task) { if (!task) {
ret = -ESRCH; ret = -ESRCH;
goto out_put; goto out_unlock;
} }
seq_printf(m, "\nproc: %s\n", task->comm); seq_printf(m, "\nproc: %s\n", task->comm);
put_task_struct(task); put_task_struct(task);
idr_for_each(&file_priv->context_idr, per_file_ctx, idr_for_each(&file_priv->context_idr, per_file_ctx,
(void *)(unsigned long)m); (void *)(unsigned long)m);
} }
out_unlock:
mutex_unlock(&dev->filelist_mutex); mutex_unlock(&dev->filelist_mutex);
out_put:
intel_runtime_pm_put(dev_priv); intel_runtime_pm_put(dev_priv);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
......
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