Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp553684pxp; Wed, 9 Mar 2022 08:05:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoua4j5kM7IkaUjhK76Aw48J+7rQW0Lj8oRIe7YPZLWUjjwXgM2M+Q6a7QKNpdPFV5gATp X-Received: by 2002:a25:81c6:0:b0:629:4011:c58a with SMTP id n6-20020a2581c6000000b006294011c58amr350496ybm.170.1646841924027; Wed, 09 Mar 2022 08:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646841924; cv=none; d=google.com; s=arc-20160816; b=qB5uZAAK6fxKkOP7AH33AAGSZe1W/HdCiFfBg09VlaJGteDOSUeQnb3bR7iA1ovAV4 ct9hrjv+Vuy/4iGT9E7/Ev55n7+LKJFcw3+9F8t+ANW9wdvCCAofH2SqSg1gHqFIg5Fd mGqGfMcaH+CfpMwGWLeTq/caM4YT0tQMbRuwhJxEA3YgzZR39F2Akn+I1DFgwRq3ciK8 WTaXXjQufrG4MiE19i35aVfLFelyLQ3ne3KvCsqXwJEmNfER07dMs7uCjzmUuqoHZ3e6 k7Q2w5H/hj/g31ZEHbvULQ+bbmE5hSeP00kJw6UCbI50m7d2yNvxWd7+JhytDF2WhJ8m lj/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UXHAK92JqnDX1wgmhZ+9Ggn45fDlG5t5dL89uy4Trmk=; b=iuCemm9wyZmnxC/z5ulHuK7Gua7x5erH5wK4P23JKIWMJt2v1Ij/OfmL796TyNYO7a Wppr+hujFfpeH7XZW+muGptoNnrT6KhkTpkb93as4O5Jr4Cnk1VKP9dKBP6qdgMzRFbU jQlCcqpfk74Se1T3ZhUsqayI6JzXe616zg4+3Jq9mP/FSlmbaETB9IJ3tWt+HxIr9+Jl YDLNq5aFYeBn4g2djVzrQMyEz0Fy/1UlTWryda1lO1F2+5Xr9eOhGYyaaE/LPl2EJbRz bf3aRRjgC9+OBfIAqgIWuYyIjzcHpK21O+8WfXYibGQSkN+x2gpkOGUCEPp7aHxrIegl QOIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VrJCGtA1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z129-20020a818987000000b002db30d3c78fsi1338266ywf.83.2022.03.09.08.05.02; Wed, 09 Mar 2022 08:05:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VrJCGtA1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233626AbiCIOtP (ORCPT + 99 others); Wed, 9 Mar 2022 09:49:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231774AbiCIOtO (ORCPT ); Wed, 9 Mar 2022 09:49:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B1104CD4F; Wed, 9 Mar 2022 06:48:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1ABF860F90; Wed, 9 Mar 2022 14:48:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF766C340E8; Wed, 9 Mar 2022 14:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646837294; bh=UM0WFg9q9w48swktQUse17RKS8k2QIrd2KQ/iF65Dtk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VrJCGtA1H1sC6ng+6sTR6vEdgvomB73pxaJq8l6l7d35QZhHeJbW04yp5KPzp6C9M 5T2asLont4COiNGY/J+/D3mDsAOcqQz76LDWBA79KCb0YmLXMKZroNcfMBDPAA0mkG I0j8w2ITsLlPu+JxJY2PjgSYR0+t2ZqDJ+/ezNks= Date: Wed, 9 Mar 2022 15:48:10 +0100 From: Greg Kroah-Hartman To: Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Yongzhi Liu , Vinod Koul , Sasha Levin Subject: Re: [PATCH 5.10 012/105] dmaengine: shdma: Fix runtime PM imbalance on error Message-ID: References: <20220307091644.179885033@linuxfoundation.org> <20220307091644.529997660@linuxfoundation.org> <20220309105420.GA22677@duo.ucw.cz> <20220309123509.GA30506@duo.ucw.cz> <20220309135708.GB30506@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220309135708.GB30506@duo.ucw.cz> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 09, 2022 at 02:57:08PM +0100, Pavel Machek wrote: > On Wed 2022-03-09 14:40:56, Greg Kroah-Hartman wrote: > > On Wed, Mar 09, 2022 at 01:35:09PM +0100, Pavel Machek wrote: > > > On Wed 2022-03-09 12:58:46, Greg Kroah-Hartman wrote: > > > > On Wed, Mar 09, 2022 at 11:54:20AM +0100, Pavel Machek wrote: > > > > > Hi! > > > > > > > > > > > From: Yongzhi Liu > > > > > > > > > > > > [ Upstream commit 455896c53d5b803733ddd84e1bf8a430644439b6 ] > > > > > > > > > > > > pm_runtime_get_() increments the runtime PM usage counter even > > > > > > when it returns an error code, thus a matching decrement is needed on > > > > > > the error handling path to keep the counter balanced. > > > > > > > > > > This patch will break things. > > > > > > > > > > Notice that -ret is ignored (checked 4.4 and 5.10), so we don't > > > > > actually abort/return error; we just printk. We'll do two > > > > > pm_runtime_put's after the "fix". > > > > > > > > > > Please drop from -stable. > > > > > > > > > > It was discussed during AUTOSEL review: > > > > > > > > > > Date: Fri, 25 Feb 2022 14:25:10 +0800 (GMT+08:00) > > > > > From: 刘永志 > > > > > To: pavel machek > > > > > Cc: sasha levin , linux-kernel@vger.kernel.org, > > > > > Subject: Re: [PATCH AUTOSEL 5.16 24/30] dmaengine: shdma: Fix runtime PM > > > > > imbalance on error > > > > > > > > So 5.15 and 5.16 is ok, but older is not? > > > > > > I believe commit is wrong for mainline and all stable releases, and > > > author seems to agree. Drop from everywhere. > > > > Is it reverted in Linus's tree yet? > > It will take you a minute to check. > > Take a look at the patch. There's no return in error path, thus doing > runtime_put is clearly bogus. Should take you less than minute to > verify. > > Please drop the patch. I want to have it reverted in Linus's tree as well, otherwise that's a regression that people will hit. thanks, greg k-h