Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2382631pxa; Fri, 7 Aug 2020 09:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/33D0PzMepxL8MCp2GLdN01caVCl1Xr6rB+ibIIviJ4Z4fHzhj6Qf9CAFvRsz/PG7uPLS X-Received: by 2002:a17:906:5902:: with SMTP id h2mr10708153ejq.423.1596818732107; Fri, 07 Aug 2020 09:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596818732; cv=none; d=google.com; s=arc-20160816; b=S2LUS0YpcB4C8FwFQwk75J5oEWT0TE3vOBp4bWTXHP5TTDdkAZ696xF3q/u+sySlhm ABBNDMu7bzTN3oN9ShY64xvz1M97sIvlk7NRKfy4ZAPCbMeBjUclW9rdvG2h+vwuNGBJ roE4Z4Kt6IZ80E0IZJo0s1A20EqxsS1FRu/kskqoT888GCKiFdaFVt8MmMOVM66X4x33 vqfB8wzzaTg62u2Uih7Zq2uT6BqVQKmkYnRt0QcjkFlxOJyg/kDKgDiscVBRdmDkf1qz TTnkrKKIbBEgd3+LkuHG+O3hbNyW9DEyBe13QA0QBRV0MaLlyTdmQZ8/ME0SkJbJEcJf Xkzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LFdgswPeOYyB/1sV4Oc4wuYDnJlODuZDBOGbfPMJTdA=; b=iBLgD2HR4YxI2VqqnJSshD5bsjKrwQJ/pf/RF5sqXVGkG7ddtmuMmLGUTh1Sv03qin gby7zTtW1UgPFbHyqqmbdatXImlHOx7ZSjpmmprxNpczFVugHDQS0x8G+/s8Vxy6lKOW 7vTnapoqXR70/UaZ5kdJ4AU8pNO6tpULwbXyr3mbpr3ewTeATZ6x2xJNfrWPmwTNr1Wq s5GaM6PW1+QR9lCqQSuuRuJEL/W6kcX7rTNI0a59dlAiQUDxl85jjHD8SbPU8HovbVRU tGCEcjoLah0SiJy4WgDkJ99Ov3qB/NvAaIVfPdCT7kbb0qA28WAb1ECF4lAptlqdBMaw MQJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dPP690LZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si5496953ejv.299.2020.08.07.09.45.03; Fri, 07 Aug 2020 09:45:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dPP690LZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726726AbgHGQl6 (ORCPT + 99 others); Fri, 7 Aug 2020 12:41:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:46830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbgHGQl5 (ORCPT ); Fri, 7 Aug 2020 12:41:57 -0400 Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9110A22CF6 for ; Fri, 7 Aug 2020 16:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596818516; bh=JIT48tVRZh5QtnoL/3kqeGILzTIHzJZvgKbBayuzwqU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dPP690LZGh53qfbPoHyUj4HNywvQpaH0I2L9T7cN2sYIwZQ4y6AbA37GIcwX7zoge OSEn6hsUR1GnTYIcivIindYHmyYBiXDDmzbQ9cnZIKCDl35IPk46zYlyb+bKa85lCI iHcx3TvxeaL/TOl46JAj7eGTq8tlN2m1DD815vfY= Received: by mail-oo1-f52.google.com with SMTP id a9so539897oof.12 for ; Fri, 07 Aug 2020 09:41:56 -0700 (PDT) X-Gm-Message-State: AOAM5310z3E9ln+m7U7Lsu6O4NfCqAA22PsvFE1UJi+dMU9pfb+qyg3G yDHuZIGZV7wmPPuxQVUFJIPjpBaGiHS4Xee42w== X-Received: by 2002:a4a:a60a:: with SMTP id e10mr13335121oom.25.1596818515873; Fri, 07 Aug 2020 09:41:55 -0700 (PDT) MIME-Version: 1.0 References: <20200614063619.44944-1-navid.emamdoost@gmail.com> In-Reply-To: <20200614063619.44944-1-navid.emamdoost@gmail.com> From: Rob Herring Date: Fri, 7 Aug 2020 10:41:43 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/panfrost: perfcnt: fix ref count leak in panfrost_perfcnt_enable_locked To: Navid Emamdoost Cc: Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , David Airlie , Daniel Vetter , dri-devel , "linux-kernel@vger.kernel.org" , Navid Emamdoost , wu000273@umn.edu, kjlu@umn.edu, mccamant@cs.umn.edu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 14, 2020 at 12:36 AM Navid Emamdoost wrote: > > in panfrost_perfcnt_enable_locked, pm_runtime_get_sync is called which > increments the counter even in case of failure, leading to incorrect > ref count. In case of failure, decrement the ref count before returning. > > Signed-off-by: Navid Emamdoost > --- > drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) Applied. Rob