]> git.baikalelectronics.ru Git - kernel.git/commit
s390/smp: lost IPIs on cpu hotplug
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 22 May 2013 08:24:37 +0000 (10:24 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 27 May 2013 07:16:15 +0000 (09:16 +0200)
commita52f803ee0f825389758c3b1155825a14e136d92
tree4b3a71b06a231eb457c30e787a163608bd417ff1
parent086f846cf9dbcb3651fda8add530c43949ecb409
s390/smp: lost IPIs on cpu hotplug

IPIs might be lost when a cpu gets brought offline:

When stop_machine executes its state machine there is a race window
for the state STOPMACHINE_DISABLE_IRQ where the to be brought offline
cpu might already have irqs disabled but a different cpu still may
have irqs enabled.
If the enabled cpu receives an interrupt and as a result sends an IPI
to the to be offlined cpu in its bottom halve context, the IPI won't
be noticed before the cpu is offline.

In fact the race window is much larger since there is no guarantee
when an IPI will be received.

To fix this check for enqueued but not yet received IPIs in the
cpu_disable() path and call the respective handlers before the cpu
is marked offline.

Reported-by: Juergen Doelle <juergen.doelle@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/smp.c