ftrace: Check for successful allocation of hash
[sfrench/cifs-2.6.git] / kernel / cpu.c
index ef1c565edc5da5407e8eb4eb48c9c8250fa8e0b9..e84c0873559ed3f4dff968a6240293bb22f0978b 100644 (file)
@@ -522,7 +522,7 @@ static int bringup_wait_for_ap(unsigned int cpu)
        /*
         * SMT soft disabling on X86 requires to bring the CPU out of the
         * BIOS 'wait for SIPI' state in order to set the CR4.MCE bit.  The
-        * CPU marked itself as booted_once in cpu_notify_starting() so the
+        * CPU marked itself as booted_once in notify_cpu_starting() so the
         * cpu_smt_allowed() check will now return false if this is not the
         * primary sibling.
         */
@@ -1221,6 +1221,13 @@ int freeze_secondary_cpus(int primary)
        for_each_online_cpu(cpu) {
                if (cpu == primary)
                        continue;
+
+               if (pm_wakeup_pending()) {
+                       pr_info("Wakeup pending. Abort CPU freeze\n");
+                       error = -EBUSY;
+                       break;
+               }
+
                trace_suspend_resume(TPS("CPU_OFF"), cpu, true);
                error = _cpu_down(cpu, 1, CPUHP_OFFLINE);
                trace_suspend_resume(TPS("CPU_OFF"), cpu, false);