Skip to content
  • Don Zickus's avatar
    kernel/watchdog: prevent false hardlockup on overloaded system · b13b3b70
    Don Zickus authored
    
    [ Upstream commit b94f5118 ]
    
    On an overloaded system, it is possible that a change in the watchdog
    threshold can be delayed long enough to trigger a false positive.
    
    This can easily be achieved by having a cpu spinning indefinitely on a
    task, while another cpu updates watchdog threshold.
    
    What happens is while trying to park the watchdog threads, the hrtimers
    on the other cpus trigger and reprogram themselves with the new slower
    watchdog threshold.  Meanwhile, the nmi watchdog is still programmed
    with the old faster threshold.
    
    Because the one cpu is blocked, it prevents the thread parking on the
    other cpus from completing, which is needed to shutdown the nmi watchdog
    and reprogram it correctly.  As a result, a false positive from the nmi
    watchdog is reported.
    
    Fix this by setting a park_in_progress flag to block all lockups until
    the parking is complete.
    
    Fix provided by Ulrich Obergfell.
    
    [akpm@linux-foundat...
    b13b3b70