Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp419925ybe; Mon, 2 Sep 2019 03:52:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWYEIsntNvF8MSPrYzojataM69EtKLBe9GLgD1Vl6/045ostFRLk8lm5+xTOGkgtr9fkR9 X-Received: by 2002:aa7:8556:: with SMTP id y22mr6731839pfn.252.1567421523664; Mon, 02 Sep 2019 03:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567421523; cv=none; d=google.com; s=arc-20160816; b=EiMzoAy55aK8Ct/fo4BVMzvT6Gl9cuUGvtBCU7rh0y+hbfgfle79FjcKKodsghU82R I0bzvrGM5fGYu5MeexesO68VAPcWowOqX00QF8Z6o9jRqCt4P9rAQGjjH7gYaszK66pU RfgSesV9JACaRkArQIFneqRuAQmu6XUBPLozKCt4fRs5FYLB6rZfa/tuMcgKPfcx/rrz QocWw+XWfOQfdYwVohWfIygCo/qeU0BsgirLwuIuk5GVLETcb0tiFUS5ho3Z3yQc5xAo UjPR4rry3sAQAHNm1gnVCtLUIAFK1r8JYEZSGdc+pl/oLWLRdzGe2vZBGw8iLm/lqZg2 7dBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=QPqy21keXUACCeDqDycIzQop+1GNfbDhCdTagBMVQ9I=; b=0owlszM3vZzIbW23DMBN7ScUaaBKIh7DPV75Vgcxea/X0/KOKViLgHpkafNb82b7zq kae6Dd/gNMVKBYM95TIh1sKHtj64yIsKo3tps/hoa5QMe/+rFC2JOX/7x23t//HsCxfR fbNLgNwYbNvH3rU0w3BoDSjSwWkOkb+/4/aXVpvFIXqhC3Y02A4SDpceklRhm40Co8Di 4wciAk13y6P1yMk5ixh1MWsv54CQhAfH7HCSmrhBj1IosgE48AgorSvNflOsZbQA+KrO YtrFgj/4iFUiiryDf0wfBYz5th6P62LrbV6naU5DAhyLurQ8SwDyVhxZPvkIhWx5Dhv4 JOyw== ARC-Authentication-Results: i=1; mx.google.com; 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 f4si7309415pgs.62.2019.09.02.03.51.48; Mon, 02 Sep 2019 03:52:03 -0700 (PDT) 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; 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 S1731337AbfIBKu6 (ORCPT + 99 others); Mon, 2 Sep 2019 06:50:58 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:56825 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730903AbfIBKu6 (ORCPT ); Mon, 2 Sep 2019 06:50:58 -0400 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1i4jv5-0007oW-At; Mon, 02 Sep 2019 12:50:47 +0200 Message-ID: <76f25b70dd874c49c861a812384391c87240f5e7.camel@pengutronix.de> Subject: Re: [PATCH -next] drm/etnaviv: fix missing unlock on error in etnaviv_iommuv1_context_alloc() From: Lucas Stach To: Wei Yongjun , Russell King , Christian Gmeiner , David Airlie , Daniel Vetter Cc: etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Date: Mon, 02 Sep 2019 12:50:44 +0200 In-Reply-To: <20190819061733.50023-1-weiyongjun1@huawei.com> References: <20190819061733.50023-1-weiyongjun1@huawei.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mo, 2019-08-19 at 06:17 +0000, Wei Yongjun wrote: > Add the missing unlock before return from function > etnaviv_iommuv1_context_alloc() > in the error handling case. > > Fixes: 27b67278e007 ("drm/etnaviv: rework MMU handling") > Signed-off-by: Wei Yongjun Thanks, applied. For my education, can you tell me which tool you did use to catch this issue? Regards, Lucas > --- > drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c > b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c > index aac8dbf3ea56..1a7c89a67bea 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c > @@ -140,8 +140,10 @@ etnaviv_iommuv1_context_alloc(struct > etnaviv_iommu_global *global) > } > > v1_context = kzalloc(sizeof(*v1_context), GFP_KERNEL); > - if (!v1_context) > + if (!v1_context) { > + mutex_unlock(&global->lock); > return NULL; > + } > > v1_context->pgtable_cpu = dma_alloc_wc(global->dev, PT_SIZE, > &v1_context- > >pgtable_dma, > > >