From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v2 5/8] watchdog: core: Restore WDOG_HW_RUNNING if stopping watchdog fails
Date: Wed, 28 Oct 2026 03:14:23 +0000 [thread overview]
Message-ID: <auFoj8dTQc9YORh3@google.com> (raw)
In-Reply-To: <20261027160302.2519282-6-linux@roeck-us.net>
On Tue, Oct 27, 2026 at 09:02:59AM -0700, Guenter Roeck wrote:
> In watchdog_stop(), WDOG_HW_RUNNING is cleared before calling
> wdd->ops->stop(). If wdd->ops->stop() returns an error, WDOG_ACTIVE
> remains set, but WDOG_HW_RUNNING is left cleared. As a result,
> subsequent calls to watchdog_ping() become no-ops, and
> watchdog_release() sees watchdog_hw_running() as false and drops the
> module and device references while the ping worker (guided by
> WDOG_ACTIVE) continues to run.
>
> Restore WDOG_HW_RUNNING if wdd->ops->stop() fails.
>
> Fixes: 3c10bbde10fe ("watchdog: core: Clear WDOG_HW_RUNNING before calling the stop function")
> Assisted-by: LLM
> Cc: Tzung-Bi Shih <tzungbi@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
next prev parent reply other threads:[~2026-10-28 3:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 16:02 [PATCH v2 0/8] watchdog: core: Fix locking, lifetime, suspend, and state management bugs Guenter Roeck
2026-10-27 16:02 ` [PATCH v2 1/8] watchdog: core: Clear wd_data pointer on errors Guenter Roeck
2026-10-27 16:02 ` [PATCH v2 2/8] watchdog: core: Add missing locks Guenter Roeck
2026-10-27 16:02 ` [PATCH v2 3/8] watchdog: core: Prevent ping worker from re-arming timer on suspend Guenter Roeck
2026-10-27 16:02 ` [PATCH v2 4/8] watchdog: core: Stop pretimeout hrtimer " Guenter Roeck
2026-10-27 16:02 ` [PATCH v2 5/8] watchdog: core: Restore WDOG_HW_RUNNING if stopping watchdog fails Guenter Roeck
2026-10-28 3:14 ` Tzung-Bi Shih [this message]
2026-10-28 15:00 ` Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2026-10-27 15:47 [PATCH v2 0/8] watchdog: core: Fix locking, lifetime, suspend, and state management bugs Guenter Roeck
2026-10-27 15:48 ` [PATCH v2 5/8] watchdog: core: Restore WDOG_HW_RUNNING if stopping watchdog fails Guenter Roeck
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=auFoj8dTQc9YORh3@google.com \
--to=tzungbi@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
/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