Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1421450 > unrolled thread
| Started by | weiyj_lk@163.com |
|---|---|
| First post | 2016-06-14 01:50 +0200 |
| Last post | 2016-06-14 08:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] drm/i915: Fix missing unlock on error in i915_ppgtt_info() weiyj_lk@163.com - 2016-06-14 01:50 +0200
Re: [Intel-gfx] [PATCH] drm/i915: Fix missing unlock on error in i915_ppgtt_info() Daniel Vetter <daniel@ffwll.ch> - 2016-06-14 08:00 +0200
| From | weiyj_lk@163.com |
|---|---|
| Date | 2016-06-14 01:50 +0200 |
| Subject | [PATCH] drm/i915: Fix missing unlock on error in i915_ppgtt_info() |
| Message-ID | <rJJMd-50f-1@gated-at.bofh.it> |
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 3269033..1035468 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2365,16 +2365,16 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
task = get_pid_task(file->pid, PIDTYPE_PID);
if (!task) {
ret = -ESRCH;
- goto out_put;
+ goto out_unlock;
}
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_unlock:
mutex_unlock(&dev->filelist_mutex);
-out_put:
intel_runtime_pm_put(dev_priv);
mutex_unlock(&dev->struct_mutex);
[toc] | [next] | [standalone]
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Date | 2016-06-14 08:00 +0200 |
| Subject | Re: [Intel-gfx] [PATCH] drm/i915: Fix missing unlock on error in i915_ppgtt_info() |
| Message-ID | <rJPyh-wi-13@gated-at.bofh.it> |
| In reply to | #1421450 |
On Mon, Jun 13, 2016 at 11:42:00PM +0000, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
Applied to drm-misc, thanks.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 3269033..1035468 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2365,16 +2365,16 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
> task = get_pid_task(file->pid, PIDTYPE_PID);
> if (!task) {
> ret = -ESRCH;
> - goto out_put;
> + goto out_unlock;
> }
> 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_unlock:
> mutex_unlock(&dev->filelist_mutex);
>
> -out_put:
> intel_runtime_pm_put(dev_priv);
> mutex_unlock(&dev->struct_mutex);
>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web