From 3d6e5ccb062a34f83ec0883e510bf6cef349fe82 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 28 Feb 2004 22:01:19 +0000 Subject: [PATCH] Make sure to disable the watchdog if we cannot honour the timeout. --- sys/kern/kern_clock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index e90e0244f45..027ce782c40 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -510,10 +510,9 @@ watchdog_config(void *unused __unused, u_int cmd, int *err) { u_int u; - if (cmd) { + u = cmd & WD_INTERVAL; + if (cmd && u >= WD_TO_1SEC) { u = cmd & WD_INTERVAL; - if (u < WD_TO_1SEC) - return; watchdog_ticks = (1 << (u - WD_TO_1SEC)) * hz; watchdog_enabled = 1; *err = 0;