[PATCH] watchdog: Allow touch_nmi_watchdog() to be called by acpi_os_stall()

From: Rafael J. Wysocki
Date: Wed Aug 25 2010 - 19:00:32 EST


From: Rafael J. Wysocki <rjw@xxxxxxx>

acpi_os_stall() executes touch_nmi_watchdog() that, if
CONFIG_HARDLOCKUP_DETECTOR is set,
uses __get_cpu_var() to access per-CPU variables. This triggers the
stack dump in debug_smp_processor_id().

One way to avoid that is to use __raw_get_cpu_var() to access the
per-CPU variables in touch_nmi_watchdog().

Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
---
kernel/watchdog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/watchdog.c
===================================================================
--- linux-2.6.orig/kernel/watchdog.c
+++ linux-2.6/kernel/watchdog.c
@@ -142,8 +142,8 @@ void touch_all_softlockup_watchdogs(void
#ifdef CONFIG_HARDLOCKUP_DETECTOR
void touch_nmi_watchdog(void)
{
- __get_cpu_var(watchdog_nmi_touch) = true;
- touch_softlockup_watchdog();
+ __raw_get_cpu_var(watchdog_nmi_touch) = true;
+ __raw_get_cpu_var(watchdog_touch_ts) = 0;
}
EXPORT_SYMBOL(touch_nmi_watchdog);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/