Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / processor_driver.c
index 7f70f3182d506ffc41ce61f370e047d514c34db3..4fcbd670415c6fa1a61b02a970563a5d220a9ea7 100644 (file)
@@ -121,6 +121,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
        struct acpi_processor *pr = per_cpu(processors, cpu);
        struct acpi_device *device;
 
+       /*
+        * CPU_STARTING and CPU_DYING must not sleep. Return here since
+        * acpi_bus_get_device() may sleep.
+        */
+       if (action == CPU_STARTING || action == CPU_DYING)
+               return NOTIFY_DONE;
+
        if (!pr || acpi_bus_get_device(pr->handle, &device))
                return NOTIFY_DONE;