mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: weiyj_lk@163.com
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	David Airlie <airlied@linux.ie>,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix missing unlock on error in i915_ppgtt_info()
Date: Tue, 14 Jun 2016 07:57:31 +0200	[thread overview]
Message-ID: <20160614055731.GN1338@phenom.ffwll.local> (raw)
In-Reply-To: <1465861320-26221-1-git-send-email-weiyj_lk@163.com>

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

      reply	other threads:[~2016-06-14  5:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 23:42 weiyj_lk
2016-06-14  5:57 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160614055731.GN1338@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyj_lk@163.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®