linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: wu000273@umn.edu, kjlu@umn.edu,
	Rick Chang <rick.chang@mediatek.com>,
	Bin Liu <bin.liu@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Ricky Liang <jcliang@chromium.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Minghsiu Tsai <minghsiu.tsai@mediatek.com>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: mtk-jpeg: Fix a reference count leak.
Date: Wed, 21 Apr 2021 15:28:42 +0200	[thread overview]
Message-ID: <CAJKOXPeQZWZpeStxwEhOGoFuPQzRxNHkanEZ=8nrfg7DUccoEQ@mail.gmail.com> (raw)
In-Reply-To: <19432e4d-dcc4-5056-17ef-a6d2dd7b6fb4@xs4all.nl>

On Thu, 17 Sept 2020 at 13:48, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>
> On 14/06/2020 01:08, wu000273@umn.edu wrote:
> > From: Qiushi Wu <wu000273@umn.edu>
> >
> > pm_runtime_get_sync() increments the runtime PM usage counter even
> > when it returns an error code. Thus call pm_runtime_put_noidle()
> > if pm_runtime_get_sync() fails.
> >
> > Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver")
> > Signed-off-by: Qiushi Wu <wu000273@umn.edu>
> > ---
> >  drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> > index f82a81a3bdee..097f0b050f67 100644
> > --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> > +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> > @@ -710,8 +710,10 @@ static int mtk_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
> >       int ret = 0;
> >
> >       ret = pm_runtime_get_sync(ctx->jpeg->dev);
> > -     if (ret < 0)
> > +     if (ret < 0) {
> > +             pm_runtime_put_noidle(ctx->jpeg->dev);
> >               goto err;
> > +     }
> >
> >       return 0;
> >  err:
> >
>
> This patch no longer applies, can you rebase this?

This patch might be harmful, might be not. Probably should be skipped
due to uncertain intentions:
https://lore.kernel.org/linux-nfs/YH+7ZydHv4+Y1hlx@kroah.com/

Best regards,
Krzysztof

      reply	other threads:[~2021-04-21 13:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13 23:08 [PATCH] media: mtk-jpeg: Fix a reference count leak wu000273
2020-09-17 11:42 ` Hans Verkuil
2021-04-21 13:28   ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJKOXPeQZWZpeStxwEhOGoFuPQzRxNHkanEZ=8nrfg7DUccoEQ@mail.gmail.com' \
    --to=krzk@kernel.org \
    --cc=bin.liu@mediatek.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jcliang@chromium.org \
    --cc=kjlu@umn.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=minghsiu.tsai@mediatek.com \
    --cc=rick.chang@mediatek.com \
    --cc=wu000273@umn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).