From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbcFNF5h (ORCPT ); Tue, 14 Jun 2016 01:57:37 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35186 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbcFNF5g (ORCPT ); Tue, 14 Jun 2016 01:57:36 -0400 Date: Tue, 14 Jun 2016 07:57:31 +0200 From: Daniel Vetter To: weiyj_lk@163.com Cc: Daniel Vetter , Jani Nikula , David Airlie , Wei Yongjun , 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() Message-ID: <20160614055731.GN1338@phenom.ffwll.local> Mail-Followup-To: weiyj_lk@163.com, Daniel Vetter , Jani Nikula , David Airlie , Wei Yongjun , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1465861320-26221-1-git-send-email-weiyj_lk@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465861320-26221-1-git-send-email-weiyj_lk@163.com> X-Operating-System: Linux phenom 4.6.0-rc5+ User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 13, 2016 at 11:42:00PM +0000, weiyj_lk@163.com wrote: > From: Wei Yongjun > > 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 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