diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2026-10-27 09:02:59 -0700 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-11-16 13:26:11 -0800 |
| commit | 8cdd82238ed3f366850dd0bd1e130e09ba2ebc4c (patch) | |
| tree | 7aedb7bb3c9156fb78e4f4597f3f9f758c4aa6a4 /rust/kernel/alloc | |
| parent | 19f018a8a898a81d848be4b12bb9f707721bdb02 (diff) | |
watchdog: core: Restore WDOG_HW_RUNNING if stopping watchdog fails
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")
Cc: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20261027160302.2519282-6-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
