All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Triet Hoang <triet.hoang.dev@gmail.com>, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v2 4/8] watchdog: msc313e_wdt: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Wed, 16 Sep 2026 03:35:28 +0000	[thread overview]
Message-ID: <aqoOgP8xeUx_uqWY@google.com> (raw)
In-Reply-To: <20260914092012.20B861F000FF@smtp.kernel.org>

On Mon, Sep 14, 2026 at 09:20:11AM +0000, sashiko-bot@kernel.org wrote:
> > diff --git a/drivers/watchdog/msc313e_wdt.c b/drivers/watchdog/msc313e_wdt.c
> > index 4a5cce2a16b18..a77ff57a44571 100644
> > --- a/drivers/watchdog/msc313e_wdt.c
> > +++ b/drivers/watchdog/msc313e_wdt.c
> 
> [ ... ]
> 
> > -static int __maybe_unused msc313e_wdt_resume(struct device *dev)
> > +static int msc313e_wdt_resume(struct device *dev)
> >  {
> >  	struct msc313e_wdt_priv *priv = dev_get_drvdata(dev);
> >  
> >  	if (watchdog_active(&priv->wdev) || watchdog_hw_running(&priv->wdev))
> >  		msc313e_wdt_start(&priv->wdev);
> >  
> >  	return 0;
> 
> [Severity: High]
> This is a pre-existing issue, but does msc313e_wdt_resume() need to handle
> the return value of msc313e_wdt_start()?
> 
> If clk_prepare_enable() fails inside msc313e_wdt_start():
> 
> msc313e_wdt_start() {
> 	...
> 	err = clk_prepare_enable(priv->clk);
> 	if (err)
> 		return err;
> 	...
> }
> 
> The error is returned to msc313e_wdt_resume(), which discards it and returns
> 0. Because the watchdog core state still considers the hardware active,
> could subsequent operations like watchdog ping perform writes to unclocked
> hardware registers (such as REG_WDT_CLR) and trigger a bus fault or system
> crash?

https://lore.kernel.org/all/20260912163334.28636-1-tzungbi@kernel.org tries
to address the issue.

  reply	other threads:[~2026-09-16  3:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  8:54 [PATCH v2 0/8] watchdog: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-09-14  8:54 ` [PATCH v2 1/8] watchdog: cadence_wdt: Convert " Triet Hoang
2026-09-16  3:28   ` Tzung-Bi Shih
2026-09-16  4:54     ` Triet Hoang
2026-09-14  8:54 ` [PATCH v2 2/8] watchdog: da9062: " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 3/8] watchdog: keembay_wdt: " Triet Hoang
2026-09-14  9:11   ` sashiko-bot
2026-09-14  9:21   ` Triet Hoang
2026-09-14  8:54 ` [PATCH v2 4/8] watchdog: msc313e_wdt: " Triet Hoang
2026-09-14  9:20   ` sashiko-bot
2026-09-16  3:35     ` Tzung-Bi Shih [this message]
2026-09-14  8:54 ` [PATCH v2 5/8] watchdog: of_xilinx_wdt: " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 6/8] watchdog: pm8916_wdt: " Triet Hoang
2026-09-14  9:33   ` sashiko-bot
2026-09-14  8:54 ` [PATCH v2 7/8] watchdog: sp805_wdt: " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 8/8] watchdog: stmp3xxx_rtc_wdt: " Triet Hoang

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=aqoOgP8xeUx_uqWY@google.com \
    --to=tzungbi@kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=triet.hoang.dev@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.