Skip to content

Commit 860f01e

Browse files
Valentin Vidiccminyard
authored andcommitted
ipmi/watchdog: fix watchdog timeout set on reboot
systemd by default starts watchdog on reboot and sets the timer to ShutdownWatchdogSec=10min. Reboot handler in ipmi_watchdog than reduces the timer to 120s which is not enough time to boot a Xen machine with a lot of RAM. As a result the machine is rebooted the second time during the long run of (XEN) Scrubbing Free RAM..... Fix this by setting the timer to 120s only if it was previously set to a low value. Signed-off-by: Valentin Vidic <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent cf9806f commit 860f01e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/char/ipmi/ipmi_watchdog.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,10 +1163,11 @@ static int wdog_reboot_handler(struct notifier_block *this,
11631163
ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
11641164
ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
11651165
} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
1166-
/* Set a long timer to let the reboot happens, but
1167-
reboot if it hangs, but only if the watchdog
1166+
/* Set a long timer to let the reboot happen or
1167+
reset if it hangs, but only if the watchdog
11681168
timer was already running. */
1169-
timeout = 120;
1169+
if (timeout < 120)
1170+
timeout = 120;
11701171
pretimeout = 0;
11711172
ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
11721173
ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);

0 commit comments

Comments
 (0)