aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi Kani <toshi.kani@hp.com>2014-05-08 09:58:59 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-16 10:36:03 -0400
commit8da8373447d6a57a5a9f55233d35beb15d92d0d2 (patch)
treea3c1a1263863cec836d2887d947136b95d3953c4
parentc401eb8ee374a5fc2b56042c0072ce51a0beb0dc (diff)
ACPI / processor: Fix STARTING/DYING action in acpi_cpu_soft_notify()
During CPU online/offline testing on a large system, one of the processors got stuck after the message "bad: scheduling from the idle thread!". The problem is that acpi_cpu_soft_notify() calls acpi_bus_get_device() for all action types. CPU_STARTING and CPU_DYING do not allow the notify handlers to sleep. However, acpi_bus_get_device() can sleep in acpi_ut_acquire_mutex(). Change acpi_cpu_soft_notify() to return immediately for CPU_STARTING and CPU_DYING as they have no action in this handler. Signed-off-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/processor_driver.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 7f70f3182d50..4fcbd670415c 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -121,6 +121,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
121 struct acpi_processor *pr = per_cpu(processors, cpu); 121 struct acpi_processor *pr = per_cpu(processors, cpu);
122 struct acpi_device *device; 122 struct acpi_device *device;
123 123
124 /*
125 * CPU_STARTING and CPU_DYING must not sleep. Return here since
126 * acpi_bus_get_device() may sleep.
127 */
128 if (action == CPU_STARTING || action == CPU_DYING)
129 return NOTIFY_DONE;
130
124 if (!pr || acpi_bus_get_device(pr->handle, &device)) 131 if (!pr || acpi_bus_get_device(pr->handle, &device))
125 return NOTIFY_DONE; 132 return NOTIFY_DONE;
126 133