Skip to content

Commit 9909e61

Browse files
Valentin Vidicgregkh
authored andcommitted
ipmi/watchdog: fix watchdog timeout set on reboot
commit 860f01e96981a68553f3ca49f574ff14fe955e72 upstream. 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 <Valentin.Vidic@CARNet.hr> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 81845c2 commit 9909e61

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/char/ipmi/ipmi_watchdog.c

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

0 commit comments

Comments
 (0)