watchdog: implement error handling in lockup_detector_suspend()
authorUlrich Obergfell <uobergfe@redhat.com>
Fri, 6 Nov 2015 02:44:36 +0000 (18:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
lockup_detector_suspend() now handles errors from watchdog_park_threads().

Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
Reviewed-by: Aaron Tomlin <atomlin@redhat.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Cc: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/watchdog.c

index 704f933176668ca2a8f2c89d2870694a71f75eb8..e8b19db9c14aaa3d457762c0ebb9767ac356df85 100644 (file)
@@ -707,6 +707,11 @@ int lockup_detector_suspend(void)
 
        if (ret == 0)
                watchdog_suspended++;
+       else {
+               watchdog_disable_all_cpus();
+               pr_err("Failed to suspend lockup detectors, disabled\n");
+               watchdog_enabled = 0;
+       }
 
        mutex_unlock(&watchdog_proc_mutex);