linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "bigeasy@linutronix.de" <bigeasy@linutronix.de>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH] cpu/hotplug: Serialize callback invocations proper
Date: Tue, 14 Mar 2017 17:38:00 +0000	[thread overview]
Message-ID: <1489513067.2676.9.camel@sandisk.com> (raw)
In-Reply-To: <20170314150645.g4tdyoszlcbajmna@linutronix.de>

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!

Bart.

  reply	other threads:[~2017-03-14 17:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 17:37 [GIT pull] CPU hotplug updates for 4.9 Thomas Gleixner
2017-03-07  1:52 ` Bart Van Assche
2017-03-07  9:30   ` Thomas Gleixner
2017-03-07 22:32     ` Bart Van Assche
2017-03-08  8:25       ` Thomas Gleixner
2017-03-08 19:32         ` Bart Van Assche
2017-03-09 10:22           ` Thomas Gleixner
2017-03-09 17:20             ` Bart Van Assche
2017-03-09 17:43               ` Thomas Gleixner
2017-03-09 22:48                 ` Bart Van Assche
2017-03-10  7:23                   ` Ingo Molnar
2017-03-10 17:37                     ` Bart Van Assche
2017-03-10 21:32                 ` Bart Van Assche
2017-03-14 15:06   ` [PATCH] cpu/hotplug: Serialize callback invocations proper Sebastian Andrzej Siewior
2017-03-14 17:38     ` Bart Van Assche [this message]
2017-03-14 17:43       ` Thomas Gleixner
2017-03-14 18:25     ` [tip:smp/urgent] " tip-bot for 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=1489513067.2676.9.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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).