mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: emil.renner.berthing@canonical.com, linux-kernel@vger.kernel.org,
	linux-watchdog@vger.kernel.org, wim@linux-watchdog.org,
	xingyu.wu@starfivetech.com, ziv.xu@starfivetech.com,
	stable@vger.kernel.org
Subject: Re: [PATCH] watchdog: starfive-wdt: Fix runtime PM leak in starfive_wdt_pm_start()
Date: Wed, 16 Sep 2026 17:45:24 -0700	[thread overview]
Message-ID: <dfebf1ef-0496-4b4e-acbe-847064bf09e0@roeck-us.net> (raw)
In-Reply-To: <20260916170704.2086331-1-vulab@iscas.ac.cn>

On Wed, Sep 16, 2026 at 05:07:04PM +0000, Wentao Liang wrote:
> starfive_wdt_pm_start() takes a runtime PM reference with
> pm_runtime_get_sync(), which increments the usage counter even when it
> fails, and returns the error without dropping it again.  The watchdog
> core does not invoke the stop callback when start fails, so the
> reference taken on the error path is leaked.
> 
> Use pm_runtime_resume_and_get() instead, which keeps the usage counter
> balanced when the resume fails.
> 
> Fixes: db728ea9c7be ("drivers: watchdog: Add StarFive Watchdog driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

Applied.

Thanks,
Guenter

      reply	other threads:[~2026-09-17  0:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 17:07 Wentao Liang
2026-09-17  0:45 ` Guenter Roeck [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=dfebf1ef-0496-4b4e-acbe-847064bf09e0@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=emil.renner.berthing@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    --cc=wim@linux-watchdog.org \
    --cc=xingyu.wu@starfivetech.com \
    --cc=ziv.xu@starfivetech.com \
    /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

all inboxes | Powered by JetHome®