From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD16EC4708F for ; Mon, 31 May 2021 04:03:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CE276120E for ; Mon, 31 May 2021 04:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbhEaEFf (ORCPT ); Mon, 31 May 2021 00:05:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:56412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbhEaEFe (ORCPT ); Mon, 31 May 2021 00:05:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1413E611EE; Mon, 31 May 2021 04:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622433835; bh=0xfMtsHewwb7fTSKcKv14cPltEk1ithOlhx+6gwiMWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VM8YtfKyDimkBGOLI3jzbPADCGHY9togxkgw/t1OJMJA2/EzV9QKERn5fqR1/9ZBM 2VkbAULuFn67dcinY8YvPt9aSTfOwCD3OMfAmdOdATsGgQmlDYz+DnSq86GNczjch/ jHZF9i5WOPlctEss+1/B7yd+GY/zgo0728rj+KNPRryYFr+6z+gW8jExoB2Rzl/LTW vXnoMZEGyASpNtqOb/yP05BgodiXKKEb6VQ5ejhheI0ZgmzFsk/mWZPJPYFci2gPkE vM2QQI/dCeM0J0HcNECT+1muCQsp/Tg4DI3me/yqVGyYj14+P/A7yF1CBQ59BmTTWq knMP96zf2+otg== Date: Mon, 31 May 2021 09:33:52 +0530 From: Vinod Koul To: Yu Kuai Cc: mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, michal.simek@xilinx.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, yi.zhang@huawei.com Subject: Re: [PATCH 3/3] dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc() Message-ID: References: <20210517081826.1564698-1-yukuai3@huawei.com> <20210517081826.1564698-4-yukuai3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210517081826.1564698-4-yukuai3@huawei.com> Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 17-05-21, 16:18, Yu Kuai wrote: > pm_runtime_get_sync will increment pm usage counter even it failed. > Forgetting to putting operation will result in reference leak here. > Fix it by replacing it with pm_runtime_resume_and_get to keep usage > counter balanced. Applied, thanks -- ~Vinod From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BBB4C4708F for ; Mon, 31 May 2021 04:05:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04F78611CA for ; Mon, 31 May 2021 04:05:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04F78611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WwcOZNsuTZZQkLEvGDKdyLsR/xMOl6nAmRXOYqSK5gI=; b=MDJ/2SjeTLHXIe 0pMTHujzPPD4FD23+DOpXgY/f/50OtQjA8xWjDVw25D4hrHj3tHCrmizGacjJicAM9I3NMzEqretN OYBA7zWM46/uHge+u+RXWEGggi+XdNEkq1Bz24eoUMe4nJhjXo9h/Uh1nV0jKxoDFH3MqOvndNTKi wKoOIWARa2lBB6gz1NsPPPbUXoZfRroNQ2OYY549043y5JOCjwIQDDaue5Us3OGUXmDEQR0rGuLd4 08IWUlfsFmDzot5+8LGupla+wsq5sWri97ase4Dsc2wBSDaVJXtEN+jUz+gf8gxS36iRt9x+TW0Oy F/EraLRZMHbFkksZRtfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZ9m-00Acgu-JZ; Mon, 31 May 2021 04:04:02 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZ9g-00AcfJ-9F for linux-arm-kernel@lists.infradead.org; Mon, 31 May 2021 04:03:57 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1413E611EE; Mon, 31 May 2021 04:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622433835; bh=0xfMtsHewwb7fTSKcKv14cPltEk1ithOlhx+6gwiMWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VM8YtfKyDimkBGOLI3jzbPADCGHY9togxkgw/t1OJMJA2/EzV9QKERn5fqR1/9ZBM 2VkbAULuFn67dcinY8YvPt9aSTfOwCD3OMfAmdOdATsGgQmlDYz+DnSq86GNczjch/ jHZF9i5WOPlctEss+1/B7yd+GY/zgo0728rj+KNPRryYFr+6z+gW8jExoB2Rzl/LTW vXnoMZEGyASpNtqOb/yP05BgodiXKKEb6VQ5ejhheI0ZgmzFsk/mWZPJPYFci2gPkE vM2QQI/dCeM0J0HcNECT+1muCQsp/Tg4DI3me/yqVGyYj14+P/A7yF1CBQ59BmTTWq knMP96zf2+otg== Date: Mon, 31 May 2021 09:33:52 +0530 From: Vinod Koul To: Yu Kuai Cc: mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, michal.simek@xilinx.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, yi.zhang@huawei.com Subject: Re: [PATCH 3/3] dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc() Message-ID: References: <20210517081826.1564698-1-yukuai3@huawei.com> <20210517081826.1564698-4-yukuai3@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210517081826.1564698-4-yukuai3@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210530_210356_394179_8F5B70A9 X-CRM114-Status: UNSURE ( 6.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 17-05-21, 16:18, Yu Kuai wrote: > pm_runtime_get_sync will increment pm usage counter even it failed. > Forgetting to putting operation will result in reference leak here. > Fix it by replacing it with pm_runtime_resume_and_get to keep usage > counter balanced. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel