stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/x86: fix cpu hotplug
@ 2017-07-05 14:05 Juergen Gross
  2017-07-18 15:05 ` Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2017-07-05 14:05 UTC (permalink / raw)
  To: linux-kernel, xen-devel, x86
  Cc: boris.ostrovsky, hpa, tglx, mingo, Juergen Gross, stable

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>
---
For 4.11 the patch has to be backported.
---
 arch/x86/xen/smp_pv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/xen/smp_pv.c b/arch/x86/xen/smp_pv.c
index aae32535f4ec..3e71246da5fe 100644
--- a/arch/x86/xen/smp_pv.c
+++ b/arch/x86/xen/smp_pv.c
@@ -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>
@@ -417,7 +418,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 */
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen/x86: fix cpu hotplug
  2017-07-05 14:05 [PATCH] xen/x86: fix cpu hotplug Juergen Gross
@ 2017-07-18 15:05 ` Boris Ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Ostrovsky @ 2017-07-18 15:05 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, x86; +Cc: hpa, tglx, mingo, stable

On 07/05/2017 10:05 AM, Juergen Gross wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-18 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 14:05 [PATCH] xen/x86: fix cpu hotplug Juergen Gross
2017-07-18 15:05 ` Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).