mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
watchdog: Reduce severity of release without stop
Distinguish between releasing the watchdog without requesting that it is stopped, and failing to stop it when requested. The former is standard behaviour for systemd, while the latter may be unexpected. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
@@ -943,7 +943,7 @@ static int watchdog_release(struct inode *inode, struct file *file)
|
|||||||
{
|
{
|
||||||
struct watchdog_core_data *wd_data = file->private_data;
|
struct watchdog_core_data *wd_data = file->private_data;
|
||||||
struct watchdog_device *wdd;
|
struct watchdog_device *wdd;
|
||||||
int err = -EBUSY;
|
int err = EBUSY; /* +ve because this may be expected behaviour */
|
||||||
bool running;
|
bool running;
|
||||||
|
|
||||||
mutex_lock(&wd_data->lock);
|
mutex_lock(&wd_data->lock);
|
||||||
@@ -967,6 +967,9 @@ static int watchdog_release(struct inode *inode, struct file *file)
|
|||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id);
|
pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id);
|
||||||
watchdog_ping(wdd);
|
watchdog_ping(wdd);
|
||||||
|
} else if (err > 0) {
|
||||||
|
pr_info("watchdog%d: watchdog left running\n", wdd->id);
|
||||||
|
watchdog_ping(wdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdog_update_worker(wdd);
|
watchdog_update_worker(wdd);
|
||||||
|
|||||||
Reference in New Issue
Block a user