xen/x86: fix cpu hotplug
authorJuergen Gross <jgross@suse.com>
Wed, 5 Jul 2017 14:05:20 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:10:09 +0000 (15:10 -0700)
commit2614198e88934c9cc5900f4ee2a46a3865e4ea5c
treeb827cd617afe1a9121f0a3ae69b29fd046ea24c1
parent4fa26aab699a64f75058f422b5edf41f03eeb333
xen/x86: fix cpu hotplug

commit c185ddec54657c145a0c2055e4b87918da24974f upstream.

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().

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/xen/smp_pv.c