diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-04-12 08:06:55 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-04-13 08:25:16 +0200 |
commit | 00df35f991914db6b8bde8cf09808e19a9cffc3d (patch) | |
tree | 626f0f8fd29b55f9a203565948dfd8bb70530496 /init | |
parent | 4bfe186dbe0a058680e4bfb0d673194f0ceaffd4 (diff) | |
download | op-kernel-dev-00df35f991914db6b8bde8cf09808e19a9cffc3d.zip op-kernel-dev-00df35f991914db6b8bde8cf09808e19a9cffc3d.tar.gz |
cpu: Defer smpboot kthread unparking until CPU known to scheduler
Currently, smpboot_unpark_threads() is invoked before the incoming CPU
has been added to the scheduler's runqueue structures. This might
potentially cause the unparked kthread to run on the wrong CPU, since the
correct CPU isn't fully set up yet.
That causes a sporadic, hard to debug boot crash triggering on some
systems, reported by Borislav Petkov, and bisected down to:
2a442c9c6453 ("x86: Use common outgoing-CPU-notification code")
This patch places smpboot_unpark_threads() in a CPU hotplug
notifier with priority set so that these kthreads are unparked just after
the CPU has been added to the runqueues.
Reported-and-tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index 6f0f1c5f..a12548c 100644 --- a/init/main.c +++ b/init/main.c @@ -384,6 +384,7 @@ static noinline void __init_refok rest_init(void) int pid; rcu_scheduler_starting(); + smpboot_thread_init(); /* * We need to spawn init first so that it obtains pid 1, however * the init task will end up wanting to create kthreads, which, if |