linux/arch/powerpc
Anton Blanchard 7c5c92ed56 powerpc: Secondary CPUs must set cpu_callin_map after setting active and online
I have a busy ppc64le KVM box where guests sometimes hit the infamous
"kernel BUG at kernel/smpboot.c:134!" issue during boot:

  BUG_ON(td->cpu != smp_processor_id());

Basically a per CPU hotplug thread scheduled on the wrong CPU. The oops
output confirms it:

  CPU: 0
  Comm: watchdog/130

The problem is that we aren't ensuring the CPU active and online bits are set
before allowing the master to continue on. The master unparks the secondary
CPUs kthreads and the scheduler looks for a CPU to run on. It calls
select_task_rq and realises the suggested CPU is not in the cpus_allowed
mask. It then ends up in select_fallback_rq, and since the active and
online bits aren't set we choose some other CPU to run on.

Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-12-09 16:36:11 +11:00
..
boot Merge remote-tracking branch 'scottwood/next' into next 2014-11-18 17:00:38 +11:00
configs powerpc/config: Enable memory driver 2014-11-17 19:36:42 -06:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc/powernv: Return to cpu offline loop when finished in KVM guest 2014-12-08 13:16:31 +11:00
kernel powerpc: Secondary CPUs must set cpu_callin_map after setting active and online 2014-12-09 16:36:11 +11:00
kvm powerpc/powernv: Return to cpu offline loop when finished in KVM guest 2014-12-08 13:16:31 +11:00
lib powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
net net: bpf: be friendly to kmemcheck 2014-09-09 16:58:56 -07:00
oprofile powerpc/oprofile: Disable pagefaults during user stack read 2014-12-02 14:10:08 +11:00
perf powerpc: Replace __get_cpu_var uses 2014-11-03 12:12:32 +11:00
platforms powerpc/powernv: Return to cpu offline loop when finished in KVM guest 2014-12-08 13:16:31 +11:00
sysdev powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
xmon powerpc/xmon: Cleanup the breakpoint flags 2014-12-02 14:23:04 +11:00
Kconfig Merge remote-tracking branch 'scottwood/next' into next 2014-11-18 17:00:38 +11:00
Kconfig.debug Patch queue for ppc - 2014-08-01 2014-08-05 09:58:11 +02:00
Makefile powerpc: Add POWER8 CPU selection 2014-09-25 23:14:49 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00