From: Greg KH <gregkh@linuxfoundation.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] cpu/hotplug: Serialize callback invocations proper
Date: Sat, 29 Apr 2017 07:15:06 +0200 [thread overview]
Message-ID: <20170429051506.GA10014@kroah.com> (raw)
In-Reply-To: <20170428162728.q5dpzbc2yokcdseb@linutronix.de>
On Fri, Apr 28, 2017 at 06:27:28PM +0200, Sebastian Andrzej Siewior wrote:
> Upstream commit dc434e056fe1dada20df7ba07f32739d3a701adf
>
> 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.
>
> Fixes: 5b7aa87e0482 ("cpu/hotplug: Implement setup/removal interface")
> Reported-and-tested-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: hpa@zytor.com
> Cc: mingo@kernel.org
> Cc: akpm@linux-foundation.org
> Cc: torvalds@linux-foundation.org
> Link: http://lkml.kernel.org/r/20170314150645.g4tdyoszlcbajmna@linutronix.de
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> kernel/cpu.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
What stable tree(s) do you want htis patch applied to?
thanks,
greg k-h
next prev parent reply other threads:[~2017-04-29 5:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 16:27 [PATCH] cpu/hotplug: Serialize callback invocations proper Sebastian Andrzej Siewior
2017-04-29 5:15 ` Greg KH [this message]
2017-04-30 14:10 ` Greg KH
2017-05-01 16:59 ` [PATCH v4.9] " Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170429051506.GA10014@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bigeasy@linutronix.de \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).