Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp570686ybc; Tue, 12 Nov 2019 06:06:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxMA0sabbtU5uWPtLaowLhpNDODXJ47zzngpIQFsq811zLBZt6ky6Cp1Jsf906CEX6SYPix X-Received: by 2002:a50:ef16:: with SMTP id m22mr32513674eds.154.1573567586664; Tue, 12 Nov 2019 06:06:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573567586; cv=none; d=google.com; s=arc-20160816; b=0jCCGNKpHCq2w44uJdMAx0I9JUUfDXi6+kINMsPhpAO9EGQeh3ygXGB84RSgvi4j57 2ic68tuoqwK72ijha3MZyrdTZPSLh4OI4JA6LYqDhkdBLTB1i0DZ6gu8zkebHq0vdo2y 4z7WgjL8p3CS69k1mYZEs/pEWTF/BJaP+pJsE6t4ySZ/e6qZgNK82zErWsCmh1WrspjD T+VBcsDxvFSXgO7lgHHvLql4xOqIc9sQDqeDhzxOnN+lRXiVtDwlgTtcYR1j7dzV6hAr lzX6hmcjq8/YKl6QMsB2/jfOyb1qyEr20nlTf2iNFwM3uNK2NnSe5uVu9aC7KaucaVNg FThQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=MrWmg4S4QVjfl7ElzvbNo6Dq6sBDPaTcM04xou8JMbE=; b=LBvLNLVv6LBlPCN7lw3CIitJOP2Dl0jtNk26U3UAoSrr8AFBjBx87YmpH+sNccdjXV tvdSnc9Ci8aLO86D7TOc5kDFu5Y80lNN5yjYktydsX6aiwg+fxMmBxXpRMwXYLhdg7wV F0u0ubDBecqzNohTtZxIUrot8Ip8imsGeFtJ+5KGuWZHeTsHOnDwbxmgz+dfpjYFGHhM SutGe818+5gdNkTZOGT8CJ3dWIDvcHjM9leh2hbV0rEmNpZMbwVEmt5Ud1kRBSE4YFdb VdchpSyuvQqzh81+KrV5J7/lMGwzE04Nb/OL6xXsxiETundzzMP+ubNH8YDWzOkTW3Qy PGUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=ax6nC2Uj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi17si14944422edb.430.2019.11.12.06.06.01; Tue, 12 Nov 2019 06:06:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=ax6nC2Uj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727437AbfKLOCA (ORCPT + 99 others); Tue, 12 Nov 2019 09:02:00 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:33168 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbfKLOCA (ORCPT ); Tue, 12 Nov 2019 09:02:00 -0500 Received: by mail-wm1-f67.google.com with SMTP id a17so2422234wmb.0 for ; Tue, 12 Nov 2019 06:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=MrWmg4S4QVjfl7ElzvbNo6Dq6sBDPaTcM04xou8JMbE=; b=ax6nC2UjJtb1u8+MWf7et5sm8f0kIu4FeoVmwb6B7m7QoYHoTqVObl+BovSgMMSj/Y 9LZMJ3Q78YAesg8YG9NjW3ZTkADp/BoA9hw5aPkSBeQjZwSPGeuvAWEUC2HqA3ZoZqfo ZkBPnLF64sC+ifwhNdox79S20LdCKzVH6cupY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=MrWmg4S4QVjfl7ElzvbNo6Dq6sBDPaTcM04xou8JMbE=; b=srG7pkGFz8OrTSwzmnEIEok0EuhmotRFYhcZmly2P4m9o2F6BeNcKx55kmFV4LAO/o gp5DtVVm+Kvl5d2NLzlCD7zXrAJZ6udmgYqIfQP3ufhKhvb0BAgwaJDrf1bYAlo9jsAz puSCpC9+or/ScC+pwsvpVwbkMM9L6aKa96UoClAAemDQXytoojkuJkOIz341zM0qmK+f 3B3FBSEAH6MnMMOVWVddXWDYcENH96/KYRuxJ7g8Js5JBNusXfEAUF1naVcsDkiFYFHq AD/wKfWRb1ujiVRIk4q+6f3MwodDQn6SGAfcCRc4GuLfChU6KzwRXe2jZqCoP9utrq7E o+mA== X-Gm-Message-State: APjAAAXYRRt6Sbb5V42UIjwmJfHToVaUblWhIz8YAneuJifu3VgDVGcw R/pKe3+4k5tvMuddErx0gzqtOQ== X-Received: by 2002:a1c:984b:: with SMTP id a72mr4286085wme.78.1573567317930; Tue, 12 Nov 2019 06:01:57 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id l4sm3059222wme.4.2019.11.12.06.01.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 06:01:57 -0800 (PST) Date: Tue, 12 Nov 2019 15:01:55 +0100 From: Daniel Vetter To: Johan Hovold Cc: Rob Clark , Sean Paul , Daniel Vetter , David Airlie , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, Greg Kroah-Hartman , stable , Jordan Crouse , Harald Freudenberger , Mauro Carvalho Chehab , Fabien Dessenne , Dave Airlie Subject: Re: [PATCH 1/4] drm/msm: fix memleak on release Message-ID: <20191112140155.GJ23790@phenom.ffwll.local> Mail-Followup-To: Johan Hovold , Rob Clark , Sean Paul , David Airlie , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, Greg Kroah-Hartman , stable , Jordan Crouse , Harald Freudenberger , Mauro Carvalho Chehab , Fabien Dessenne , Dave Airlie References: <20191010131333.23635-1-johan@kernel.org> <20191010131333.23635-2-johan@kernel.org> <20191030100146.GC4691@localhost> <20191112104001.GP11035@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191112104001.GP11035@localhost> X-Operating-System: Linux phenom 5.2.0-3-amd64 User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 11:40:01AM +0100, Johan Hovold wrote: > On Wed, Oct 30, 2019 at 11:01:46AM +0100, Johan Hovold wrote: > > On Thu, Oct 10, 2019 at 03:13:30PM +0200, Johan Hovold wrote: > > > If a process is interrupted while accessing the "gpu" debugfs file and > > > the drm device struct_mutex is contended, release() could return early > > > and fail to free related resources. > > > > > > Note that the return value from release() is ignored. > > > > > > Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU state") > > > Cc: stable # 4.18 > > > Cc: Jordan Crouse > > > Cc: Rob Clark > > > Signed-off-by: Johan Hovold > > > --- > > > > Rob, Sean, > > > > Sending a reminder about this one, which is not yet in linux-next. > > > > Perhaps Daniel can pick it up otherwise? > > Another two weeks, another reminder. This one is still not in -next. Well msm is maintained in a separate tree, so the usual group maintainer fallback for when patches are stuck doesn't apply. Rob, Sean, time to reconsider drm-misc for msm? I think there's some more oddball patches that occasionally get stuck for msm ... Also +Dave. -Daniel > > Johan > > > > drivers/gpu/drm/msm/msm_debugfs.c | 6 +----- > > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c > > > index 6be879578140..1c74381a4fc9 100644 > > > --- a/drivers/gpu/drm/msm/msm_debugfs.c > > > +++ b/drivers/gpu/drm/msm/msm_debugfs.c > > > @@ -47,12 +47,8 @@ static int msm_gpu_release(struct inode *inode, struct file *file) > > > struct msm_gpu_show_priv *show_priv = m->private; > > > struct msm_drm_private *priv = show_priv->dev->dev_private; > > > struct msm_gpu *gpu = priv->gpu; > > > - int ret; > > > - > > > - ret = mutex_lock_interruptible(&show_priv->dev->struct_mutex); > > > - if (ret) > > > - return ret; > > > > > > + mutex_lock(&show_priv->dev->struct_mutex); > > > gpu->funcs->gpu_state_put(show_priv->state); > > > mutex_unlock(&show_priv->dev->struct_mutex); -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch