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: 1d2ac403ae3b(drm: Protect dev->filelist with its own mutex)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465861320-26221-1-git-send-email-weiyj_lk@163.com
(cherry picked from commit b021248690
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
6b9dc6a474
commit
cab1032743
@ -2365,16 +2365,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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user