Skip to content

Commit c185dde

Browse files
committed
xen/x86: fix cpu hotplug
Commit dc6416f ("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: <[email protected]> # 4.12 Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
1 parent 29d11cf commit c185dde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/xen/smp_pv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/irq_work.h>
2020
#include <linux/tick.h>
2121
#include <linux/nmi.h>
22+
#include <linux/cpuhotplug.h>
2223

2324
#include <asm/paravirt.h>
2425
#include <asm/desc.h>
@@ -413,7 +414,7 @@ static void xen_pv_play_dead(void) /* used only with HOTPLUG_CPU */
413414
*/
414415
tick_nohz_idle_enter();
415416

416-
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
417+
cpuhp_online_idle(CPUHP_AP_ONLINE_IDLE);
417418
}
418419

419420
#else /* !CONFIG_HOTPLUG_CPU */

0 commit comments

Comments
 (0)