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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 BB30AC433E0 for ; Wed, 30 Dec 2020 13:53:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 873BB22242 for ; Wed, 30 Dec 2020 13:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727091AbgL3Nxf (ORCPT ); Wed, 30 Dec 2020 08:53:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:34560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726656AbgL3Nxe (ORCPT ); Wed, 30 Dec 2020 08:53:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D97AB2220B; Wed, 30 Dec 2020 13:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609336368; bh=30jsp5BVA2f3TpS9tI7rc6XDWizumbT6G0NirNSQCM0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z0X4u5NxQXa/UWDGn5WU0vLZb3yjh//GXGo1yr1804TRXWhr9FEmvWo5KmzMikYi3 c79KVsuzTGNFPQUDhpBIYRmIRqXCHp3Kyz4uwV8Y3dgCilDbJKVAWo8GI3HZRZdE3B 9Hf8ighHKx0dxL77RpzXUlp+GQZFa+t0nFOvoa20= Date: Wed, 30 Dec 2020 14:54:14 +0100 From: Greg Kroah-Hartman To: Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Zhang Qilong , Herbert Xu , Sasha Levin Subject: Re: [PATCH 4.19 154/346] crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe Message-ID: References: <20201228124919.745526410@linuxfoundation.org> <20201228124927.229346776@linuxfoundation.org> <20201230131635.GA15217@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230131635.GA15217@duo.ucw.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 02:16:35PM +0100, Pavel Machek wrote: > Hi! > > > From: Zhang Qilong > > > > [ Upstream commit ff8107200367f4abe0e5bce66a245e8d0f2d229e ] > > > > The pm_runtime_enable will increase power disable depth. > > Thus a pairing decrement is needed on the error handling > > path to keep it balanced according to context. > > Oops, this is complex. > > First, same bug exist in 4.4, but is not fixed there, and there is > missing pm_runtime_put() there and elsewhere. > > 4.4 needs these two fixes + backport of ff81072003. > > 4.19 needs fixes similar to these, at three places. > > mainline is okay, afaict. > > Best regards, > Pavel > > diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c > index eba23147c0ee..48370711c794 100644 > --- a/drivers/crypto/omap-aes.c > +++ b/drivers/crypto/omap-aes.c > @@ -801,6 +801,7 @@ static int omap_aes_cra_init(struct crypto_tfm *tfm) > > err = pm_runtime_get_sync(dd->dev); > if (err < 0) { > + pm_runtime_put_sync(dd->dev); > dev_err(dd->dev, "%s: failed to get_sync(%d)\n", > __func__, err); > return err; > @@ -1195,6 +1196,7 @@ static int omap_aes_probe(struct platform_device *pdev) > pm_runtime_enable(dev); > err = pm_runtime_get_sync(dev); > if (err < 0) { > + pm_runtime_put_sync(dev); > dev_err(dev, "%s: failed to get_sync(%d)\n", > __func__, err); > goto err_res; > > Can you submit all of this in a format that I can apply it in? thanks, greg k-h