]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen/x86: fix cpu hotplug
authorJuergen Gross <jgross@suse.com>
Wed, 5 Jul 2017 14:05:20 +0000 (16:05 +0200)
committerJuergen Gross <jgross@suse.com>
Sun, 23 Jul 2017 06:13:11 +0000 (08:13 +0200)
Commit dc6416f1d711eb4c1726e845d653235dcaae12e1 ("xen/x86: Call
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE) from xen_play_dead()")
introduced an error leading to a stack overflow of the idle task when
a cpu was brought offline/online many times: by calling
cpu_startup_entry() instead of returning at the end of xen_play_dead()
do_idle() would be entered again and again.

Don't use cpu_startup_entry(), but cpuhp_online_idle() instead allowing
to return from xen_play_dead().

Cc: <stable@vger.kernel.org> # 4.12
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/smp_pv.c

index 1ea598e5f03025ef509aaafca17623f7d8cbed5f..51471408fdd1329b0097f2463acff17596b83b1e 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/irq_work.h>
 #include <linux/tick.h>
 #include <linux/nmi.h>
+#include <linux/cpuhotplug.h>
 
 #include <asm/paravirt.h>
 #include <asm/desc.h>
@@ -413,7 +414,7 @@ static void xen_pv_play_dead(void) /* used only with HOTPLUG_CPU */
         */
        tick_nohz_idle_enter();
 
-       cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
+       cpuhp_online_idle(CPUHP_AP_ONLINE_IDLE);
 }
 
 #else /* !CONFIG_HOTPLUG_CPU */