aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorUlrich Obergfell <uobergfe@redhat.com>2015-11-05 21:44:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 22:34:48 -0500
commitee7fed540563b27e1028bec0b509921496c91bf9 (patch)
treed58ef0a0559d3b99c321b7f3f7454fe0e7c7fce5 /kernel/watchdog.c
parentc993590c6ae6273681d9fb2a8d26dce03bf9d96c (diff)
watchdog: do not unpark threads in watchdog_park_threads() on error
If kthread_park() returns an error, watchdog_park_threads() should not blindly 'roll back' the already parked threads to the unparked state. Instead leave it up to the callers to handle such errors appropriately in their context. For example, it is redundant to unpark the threads if the lockup detectors will soon be disabled by the callers anyway. 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>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index e8b19db9c14a..452e4ed507e5 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -654,6 +654,12 @@ static struct smp_hotplug_thread watchdog_threads = {
654 654
655/* 655/*
656 * park all watchdog threads that are specified in 'watchdog_cpumask' 656 * park all watchdog threads that are specified in 'watchdog_cpumask'
657 *
658 * This function returns an error if kthread_park() of a watchdog thread
659 * fails. In this situation, the watchdog threads of some CPUs can already
660 * be parked and the watchdog threads of other CPUs can still be runnable.
661 * Callers are expected to handle this special condition as appropriate in
662 * their context.
657 */ 663 */
658static int watchdog_park_threads(void) 664static int watchdog_park_threads(void)
659{ 665{
@@ -665,10 +671,6 @@ static int watchdog_park_threads(void)
665 if (ret) 671 if (ret)
666 break; 672 break;
667 } 673 }
668 if (ret) {
669 for_each_watchdog_cpu(cpu)
670 kthread_unpark(per_cpu(softlockup_watchdog, cpu));
671 }
672 put_online_cpus(); 674 put_online_cpus();
673 675
674 return ret; 676 return ret;