From: Greg Kroah-Hartman Date: Tue, 15 Feb 2011 19:17:08 +0000 (-0800) Subject: .37 patches X-Git-Tag: v2.6.36.4~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71accab2e393f4145784dd1abaec5e9a40099a82;p=thirdparty%2Fkernel%2Fstable-queue.git .37 patches --- diff --git a/queue-2.6.37/series b/queue-2.6.37/series index fefd7885ba6..654529803cf 100644 --- a/queue-2.6.37/series +++ b/queue-2.6.37/series @@ -226,3 +226,4 @@ tpm-long-default-timeout-fix.patch tpm_tis-use-timeouts-returned-from-tpm.patch selinux-define-permissions-for-dcb-netlink-messages.patch selinux-do-not-compute-transition-labels-on-mountpoint-labeled-filesystems.patch +watchdog-fix-broken-nowatchdog-logic.patch diff --git a/queue-2.6.37/watchdog-fix-broken-nowatchdog-logic.patch b/queue-2.6.37/watchdog-fix-broken-nowatchdog-logic.patch new file mode 100644 index 00000000000..1138a7db7ff --- /dev/null +++ b/queue-2.6.37/watchdog-fix-broken-nowatchdog-logic.patch @@ -0,0 +1,104 @@ +From 4135038a582c20ffdadfcf6564852e0b72a20968 Mon Sep 17 00:00:00 2001 +From: Marcin Slusarz +Date: Fri, 28 Jan 2011 11:00:31 -0500 +Subject: watchdog: Fix broken nowatchdog logic + +From: Marcin Slusarz + +commit 4135038a582c20ffdadfcf6564852e0b72a20968 upstream. + +Passing nowatchdog to kernel disables 2 things: creation of +watchdog threads AND initialization of percpu watchdog_hrtimer. +As hrtimers are initialized only at boot it's not possible to +enable watchdog later - for me all watchdog threads started to +eat 100% of CPU time, but they could just crash. + +Additionally, even if these threads would start properly, +watchdog_disable_all_cpus was guarded by no_watchdog check, so +you couldn't disable watchdog. + +To fix this, remove no_watchdog variable and use already +existing watchdog_enabled variable. + +Signed-off-by: Marcin Slusarz +[ removed another no_watchdog instance ] +Signed-off-by: Don Zickus +Cc: Stephane Eranian +Cc: Peter Zijlstra +Cc: Frederic Weisbecker +LKML-Reference: <1296230433-6261-1-git-send-email-dzickus@redhat.com> +Signed-off-by: Ingo Molnar + +--- + kernel/watchdog.c | 18 +++++------------- + 1 file changed, 5 insertions(+), 13 deletions(-) + +--- a/kernel/watchdog.c ++++ b/kernel/watchdog.c +@@ -27,7 +27,7 @@ + #include + #include + +-int watchdog_enabled; ++int watchdog_enabled = 1; + int __read_mostly softlockup_thresh = 60; + + static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts); +@@ -43,9 +43,6 @@ static DEFINE_PER_CPU(unsigned long, hrt + static DEFINE_PER_CPU(struct perf_event *, watchdog_ev); + #endif + +-static int no_watchdog; +- +- + /* boot commands */ + /* + * Should we panic when a soft-lockup or hard-lockup occurs: +@@ -75,7 +72,7 @@ __setup("softlockup_panic=", softlockup_ + + static int __init nowatchdog_setup(char *str) + { +- no_watchdog = 1; ++ watchdog_enabled = 0; + return 1; + } + __setup("nowatchdog", nowatchdog_setup); +@@ -83,7 +80,7 @@ __setup("nowatchdog", nowatchdog_setup); + /* deprecated */ + static int __init nosoftlockup_setup(char *str) + { +- no_watchdog = 1; ++ watchdog_enabled = 0; + return 1; + } + __setup("nosoftlockup", nosoftlockup_setup); +@@ -475,9 +472,6 @@ static void watchdog_disable_all_cpus(vo + { + int cpu; + +- if (no_watchdog) +- return; +- + for_each_online_cpu(cpu) + watchdog_disable(cpu); + +@@ -531,7 +525,8 @@ cpu_callback(struct notifier_block *nfb, + break; + case CPU_ONLINE: + case CPU_ONLINE_FROZEN: +- err = watchdog_enable(hotcpu); ++ if (watchdog_enabled) ++ err = watchdog_enable(hotcpu); + break; + #ifdef CONFIG_HOTPLUG_CPU + case CPU_UP_CANCELED: +@@ -556,9 +551,6 @@ static int __init spawn_watchdog_task(vo + void *cpu = (void *)(long)smp_processor_id(); + int err; + +- if (no_watchdog) +- return 0; +- + err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu); + WARN_ON(notifier_to_errno(err)); +