linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Valentin Vidic <Valentin.Vidic@CARNet.hr>,
	Corey Minyard <cminyard@mvista.com>
Subject: [PATCH 4.12 29/31] ipmi/watchdog: fix watchdog timeout set on reboot
Date: Thu,  3 Aug 2017 16:17:59 -0700	[thread overview]
Message-ID: <20170803231738.600424791@linuxfoundation.org> (raw)
In-Reply-To: <20170803231737.202188456@linuxfoundation.org>

4.12-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Valentin Vidic <Valentin.Vidic@CARNet.hr>

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>

---
 drivers/char/ipmi/ipmi_watchdog.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -1163,10 +1163,11 @@ static int wdog_reboot_handler(struct no
 			ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
 			ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
 		} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
-			/* Set a long timer to let the reboot happens, but
-			   reboot if it hangs, but only if the watchdog
+			/* Set a long timer to let the reboot happen or
+			   reset if it hangs, but only if the watchdog
 			   timer was already running. */
-			timeout = 120;
+			if (timeout < 120)
+				timeout = 120;
 			pretimeout = 0;
 			ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
 			ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);

  parent reply	other threads:[~2017-08-03 23:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 23:17 [PATCH 4.12 00/31] 4.12.5-stable review Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 01/31] jfs: Dont clear SGID when inheriting ACLs Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 03/31] ALSA: hda - Add missing NVIDIA GPU codec IDs to patch table Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 04/31] ALSA: hda - Add mute led support for HP ProBook 440 G4 Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 05/31] parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 06/31] parisc: Extend disabled preemption in copy_user_page Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 07/31] parisc: Suspend lockup detectors before system halt Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 08/31] powerpc/pseries: Fix of_node_put() underflow during reconfig remove Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 09/31] mmc: sunxi: Keep default timing phase settings for new timing mode Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 10/31] NFS: invalidate file size when taking a lock Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 11/31] NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 12/31] scripts/dtc: dtx_diff - update include dts paths to match build Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 13/31] crypto: brcm - Fix SHA3-512 algorithm failure Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 14/31] crypto: brcm - remove BCM_PDC_MBOX dependency in Kconfig Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 15/31] crypto: authencesn - Fix digest_null crash Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 16/31] KVM: PPC: Book3S HV: Enable TM before accessing TM registers Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 17/31] KVM: PPC: Book3S HV: Fix host crash on changing HPT size Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 18/31] dm integrity: fix inefficient allocation of journal space Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 19/31] dm integrity: test for corrupted disk format during table load Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 20/31] md: remove idx from struct resync_pages Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 21/31] md/raid1: fix writebehind bio clone Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 22/31] md/raid5: add thread_group worker async_tx_issue_pending_all Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 23/31] drm/vmwgfx: Fix gcc-7.1.1 warning Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 24/31] drm/vmwgfx: Limit max desktop dimensions to 8Kx8K Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 25/31] drm/nouveau/disp/nv50-: bump max chans to 21 Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 26/31] drm/nouveau/bar/gf100: fix access to upper half of BAR2 Greg Kroah-Hartman
2017-08-03 23:17 ` [PATCH 4.12 28/31] isdn/i4l: fix buffer overflow Greg Kroah-Hartman
2017-08-03 23:17 ` Greg Kroah-Hartman [this message]
2017-08-03 23:18 ` [PATCH 4.12 30/31] dentry name snapshots Greg Kroah-Hartman
2017-08-03 23:18 ` [PATCH 4.12 31/31] mmc: tmio-mmc: fix bad pointer math Greg Kroah-Hartman
2017-08-04  4:53 ` [PATCH 4.12 00/31] 4.12.5-stable review Guenter Roeck
2017-08-04 16:27   ` Greg Kroah-Hartman
2017-08-04 20:55 ` Shuah Khan
2017-08-04 21:46   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170803231738.600424791@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=Valentin.Vidic@CARNet.hr \
    --cc=cminyard@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).