Skip to content
  • Peter Zijlstra's avatar
    watchdog: Fix merge 'conflict' · ab992dc3
    Peter Zijlstra authored
    Two watchdog changes that came through different trees had a non
    conflicting conflict, that is, one changed the semantics of a variable
    but no actual code conflict happened. So the merge appeared fine, but
    the resulting code did not behave as expected.
    
    Commit 195daf66 ("watchdog: enable the new user interface of the
    watchdog mechanism") changes the semantics of watchdog_user_enabled,
    which thereafter is only used by the functions introduced by
    b3738d29
    
     ("watchdog: Add watchdog enable/disable all functions").
    
    There further appears to be a distinct lack of serialization between
    setting and using watchdog_enabled, so perhaps we should wrap the
    {en,dis}able_all() things in watchdog_proc_mutex.
    
    This patch fixes a s2r failure reported by Michal; which I cannot
    readily explain. But this does make the code internally consistent
    again.
    
    Reported-and-tested-by: default avatarMichal Hocko <mhocko@suse.cz>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    ab992dc3