aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2017-07-05 10:05:20 -0400
committerJuergen Gross <jgross@suse.com>2017-07-23 02:13:11 -0400
commitc185ddec54657c145a0c2055e4b87918da24974f (patch)
tree534b075a9ed9871aed3983cfaa86c7111310b69d
parent29d11cfd8698038b87458ba4d1329b9da81150a5 (diff)
xen/x86: fix cpu hotplug
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>
-rw-r--r--arch/x86/xen/smp_pv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/xen/smp_pv.c b/arch/x86/xen/smp_pv.c
index 1ea598e5f030..51471408fdd1 100644
--- a/arch/x86/xen/smp_pv.c
+++ b/arch/x86/xen/smp_pv.c
@@ -19,6 +19,7 @@
19#include <linux/irq_work.h> 19#include <linux/irq_work.h>
20#include <linux/tick.h> 20#include <linux/tick.h>
21#include <linux/nmi.h> 21#include <linux/nmi.h>
22#include <linux/cpuhotplug.h>
22 23
23#include <asm/paravirt.h> 24#include <asm/paravirt.h>
24#include <asm/desc.h> 25#include <asm/desc.h>
@@ -413,7 +414,7 @@ static void xen_pv_play_dead(void) /* used only with HOTPLUG_CPU */
413 */ 414 */
414 tick_nohz_idle_enter(); 415 tick_nohz_idle_enter();
415 416
416 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); 417 cpuhp_online_idle(CPUHP_AP_ONLINE_IDLE);
417} 418}
418 419
419#else /* !CONFIG_HOTPLUG_CPU */ 420#else /* !CONFIG_HOTPLUG_CPU */