Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600767

Re: [PATCH] cpu/hotplug: Serialize callback invocations proper

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] cpu/hotplug: Serialize callback invocations proper
Date 2017-03-14 18:50 +0100
Message-ID <tkYK5-3xL-7@gated-at.bofh.it> (permalink)
References <sofxg-7Za-21@gated-at.bofh.it> <tiljP-6LS-3@gated-at.bofh.it> <tkWfh-1T2-57@gated-at.bofh.it> <tkYK5-3xL-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 14 Mar 2017, Bart Van Assche wrote:
> On Tue, 2017-03-14 at 16:06 +0100, Sebastian Andrzej Siewior wrote:
> > The setup/remove_state/instance() functions in the hotplug core code are
> > serialized against concurrent CPU hotplug, but unfortunately not serialized
> > against themself.
> > 
> > As a consequence a concurrent invocation of these function results in
> > corruption of the callback machinery because two instances try to invoke
> > callbacks on remote cpus at the same time. This results in missing callback
> > invocations and initiator threads waiting forever on the completion.
> > 
> > The obvious solution to replace get_cpu_online() with cpu_hotplug_begin()
> > is not possible because at least one callsite calls into these functions
> > from a get_online_cpu() locked region.
> > 
> > Extend the protection scope of the cpuhp_state_mutex from solely protecting
> > the state arrays to cover the callback invocation machinery as well.
> > 
> > Reported-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
> > Fixes: 5b7aa87e0482 ("cpu/hotplug: Implement setup/removal interface")
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> 
> Tested-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
> 
> So this regression was introduced in kernel v4.6? Anyway, thanks for the patch!

And it's very timing sensitive ....

Thanks for trying to bisect this!

       tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] cpu/hotplug: Serialize callback invocations proper Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-03-14 16:10 +0100
  Re: [PATCH] cpu/hotplug: Serialize callback invocations proper Thomas Gleixner <tglx@linutronix.de> - 2017-03-14 18:50 +0100
  [tip:smp/urgent] cpu/hotplug: Serialize callback invocations proper tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2017-03-14 19:30 +0100

csiph-web