Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp244490pxb; Fri, 16 Apr 2021 04:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzHlgHnnAu7sobrc5LLmh0r22LIxbH/KlCWrhCywUcN4G1fgovZHmt+mG0K/nrHnrwoPnG X-Received: by 2002:a17:902:e803:b029:e9:1f79:2427 with SMTP id u3-20020a170902e803b02900e91f792427mr9096325plg.21.1618573486475; Fri, 16 Apr 2021 04:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618573486; cv=none; d=google.com; s=arc-20160816; b=XcbVPhBe3NKJlKBW7AXTNacoTU8CBfWyBTfwSdTKdI0RCLoR1md7weeADV0bulkhqC XCLvg3ofJslqUWylHAf8M6Kuyu9sLtIHH95ak+i22XiDfAj2k2BJKU9j6Dmj07qHtXAp 4twW4RRbSljcQNNveo+kAIpU+w+7p8Ir+nk4JUjlUnYMNXoXiSAmS48ncPnNvMvmGimz fFM8nBK30Lalbzv1MxlXjJJEZaxkDymGYhDPd6eaaJkzds3S8V0oRmlpMx/4B1e/CUhL D8hR+1WHS88X+DFe6YpZ1sJE9opdL8kn+ZDtOINmJewO2xVcZjLMFPOXfHBOu7kCTk26 8b8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tEDw55l17hiSZ5CvfaGKQfK/6w2FdaUGurVo92Lz6cc=; b=lEaqOXCV1YH2izfSCn9pqtChT+snytqigqdpDRhdRfB9shX65LupFF8iSigVDgO13E QZT5L6Pxze1XkR8T161trpYjdpjgF0xi5vaqruZYgF5tcbKSR/esGPDYV3U/hi29qc52 dXgS7qMGl62hCzmSXrT+QZ9uRrChu4KMX0sEqzm4mvB8HAqPOzoXSI2WO4dGn/t0UnZs 7YBVhVv6f/Xvu8Ml0KVQovPCHEphHrjZC4a35CMNhzPgXaHgyxQXlZ1uZU1utPyOX4yF aryTA8bg67ld2/wiVcUJdhpHnlkoKWgerVIobwhtebZg2qPqQVVdmmhOLrW4GjxpTklE qFZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o26si5868727pgv.264.2021.04.16.04.44.33; Fri, 16 Apr 2021 04:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242267AbhDPLcW (ORCPT + 99 others); Fri, 16 Apr 2021 07:32:22 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:53100 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240600AbhDPLcV (ORCPT ); Fri, 16 Apr 2021 07:32:21 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lXMhI-0003Rk-B3; Fri, 16 Apr 2021 21:31:41 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 16 Apr 2021 21:31:40 +1000 Date: Fri, 16 Apr 2021 21:31:40 +1000 From: Herbert Xu To: Shixin Liu Cc: Corentin Labbe , "David S. Miller" , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next 1/7] crypto: sun4i-ss - Fix PM reference leak when pm_runtime_get_sync() fails Message-ID: <20210416113140.GI16633@gondor.apana.org.au> References: <20210408071831.836638-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210408071831.836638-1-liushixin2@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Apr 08, 2021 at 03:18:31PM +0800, Shixin Liu 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. > > Signed-off-by: Shixin Liu > --- > drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 2 +- > drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 2 +- > drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c | 2 +- > drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt