]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Loongson-3: Fix a cpu-hotplug issue in loongson3_ipi_interrupt()
authorHuacai Chen <chenhc@lemote.com>
Thu, 4 Jun 2015 06:53:47 +0000 (14:53 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 6 Jun 2015 08:21:10 +0000 (10:21 +0200)
commit0f0f4e261026704fdc050d0beecdbf36617824bd
tree86df4259ada205a7cf700ca0ed3a70486e262697
parenta5acfaa789a339096e6a2182131b96a921c80feb
MIPS: Loongson-3: Fix a cpu-hotplug issue in loongson3_ipi_interrupt()

setup_per_cpu_areas() only setup __per_cpu_offset[] for each possible
cpu, but loongson_sysconf.nr_cpus can be greater than possible cpus
(due to reserved_cpus_mask). So in loongson3_ipi_interrupt(), percpu
access will touch the original varible in .data..percpu section which
has been freed. Without this patch, cpu-hotplug will cause memery
corruption.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/10524/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/loongson/loongson-3/smp.c