lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/6] ipmi: Use locks on watchdog timeout set on reboot
    Date
    The IPMI watchdog timer clears or extends the timer on reboot/shutdown.
    It was using the non-locking routine for setting the watchdog timer, but
    this was causing race conditions. Instead, use the locking version to
    avoid the races. It seems to work fine.

    Signed-off-by: Corey Minyard <cminyard@mvista.com>
    ---
    drivers/char/ipmi/ipmi_watchdog.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
    index 57a53ba..99dc1da 100644
    --- a/drivers/char/ipmi/ipmi_watchdog.c
    +++ b/drivers/char/ipmi/ipmi_watchdog.c
    @@ -1167,7 +1167,7 @@ static int wdog_reboot_handler(struct notifier_block *this,
    if (code == SYS_POWER_OFF || code == SYS_HALT) {
    /* Disable the WDT if we are shutting down. */
    ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
    - panic_halt_ipmi_set_timeout();
    + 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
    @@ -1175,7 +1175,7 @@ static int wdog_reboot_handler(struct notifier_block *this,
    timeout = 120;
    pretimeout = 0;
    ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
    - panic_halt_ipmi_set_timeout();
    + ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
    }
    }
    return NOTIFY_OK;
    --
    1.7.4.1


    \
     
     \ /
      Last update: 2012-02-03 16:51    [W:0.020 / U:29.708 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site