[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yii+KtAnZ3XSJtXg@kroah.com>
Date: Wed, 9 Mar 2022 15:48:10 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Pavel Machek <pavel@...x.de>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Yongzhi Liu <lyz_cs@....edu.cn>, Vinod Koul <vkoul@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 012/105] dmaengine: shdma: Fix runtime PM imbalance
on error
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 <lyz_cs@....edu.cn>
> > > > > >
> > > > > > [ 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: 刘永志 <lyz_cs@....edu.cn>
> > > > > To: pavel machek <pavel@...x.de>
> > > > > Cc: sasha levin <sashal@...nel.org>, linux-kernel@...r.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
Powered by blists - more mailing lists