2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 03:04:01 +08:00
linux-next/arch/mips
Huacai Chen 224786779d MIPS: Init new mmu_context for each possible CPU to avoid memory corruption
Currently, init_new_context() only for each online CPU, this may cause
memory corruption when CPU hotplug and fork() happens at the same time.
To avoid this, we make init_new_context() cover each possible CPU.

Scenario:
1, CPU#1 is being offline;
2, On CPU#0, do_fork() call dup_mm() and copy a mm_struct to the child;
3, On CPU#0, dup_mm() call init_new_context(), since CPU#1 is offline
   and init_new_context() only covers the online CPUs, child has the
   same asid as its parent on CPU#1 (however, child's asid should be 0);
4, CPU#1 is being online;
5, Now, if both parent and child run on CPU#1, memory corruption (e.g.
   segfault, bus error, etc.) will occur.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Acked-by: David Daney <david.daney@cavium.com>
Patchwork: http://patchwork.linux-mips.org/patch/4995/
Acked-by: John Crispin <blogic@openwrt.org>
2013-05-08 01:19:06 +02:00
..
alchemy MIPS: Kconfig: remove "config MIPS_DISABLE_OBSOLETE_IDE" 2013-05-08 01:19:06 +02:00
ar7 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ath79 Merge git://www.linux-watchdog.org/linux-watchdog 2013-03-03 10:23:29 -08:00
bcm47xx Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into mips-for-linux-next 2013-02-22 10:07:30 +01:00
bcm63xx MIPS: BCM63XX: merge bcm63xx_clk.h into bcm63xx/clk.c 2013-05-08 01:19:04 +02:00
boot MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
cavium-octeon MIPS: Fix build error cavium-octeon without CONFIG_SMP 2013-04-05 15:10:39 +02:00
cobalt MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
configs Merge branch 'mips-next-3.9' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next 2013-02-21 12:51:33 +01:00
dec MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
emma MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
fw MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
include MIPS: Init new mmu_context for each possible CPU to avoid memory corruption 2013-05-08 01:19:06 +02:00
jazz Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
jz4740 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
kernel Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-04-05 12:23:12 -07:00
lantiq Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
lasat Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
lib MIPS: Fix logic errors in bitops.c 2013-03-12 18:57:47 +01:00
loongson MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
loongson1 Merge branch 'mips-next-3.9' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next 2013-02-21 12:51:33 +01:00
math-emu MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
mm MIPS: Build uasm-generated code only once to avoid CPU Hotplug problem 2013-05-08 01:19:06 +02:00
mti-malta Merge branch 'mips-next-3.9' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next 2013-02-21 12:51:33 +01:00
mti-sead3 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
netlogic MIPS: Netlogic: Merge platform usb.h to usb-init.c 2013-05-08 01:19:05 +02:00
oprofile MIPS: Netlogic: Fix oprofile compile on XLR uniprocessor 2013-05-08 01:19:05 +02:00
pci MIPS: BCM63XX: enable pcie for BCM6362 2013-05-08 01:19:03 +02:00
pmcs-msp71xx MIPS: MSP71xx: Move code. 2013-02-01 10:00:22 +01:00
pnx833x MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
power MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
powertv MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ralink MIPS: ralink: add CPU interrupt controller to of_irq_ids 2013-02-17 01:25:34 +01:00
rb532 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sgi-ip22 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sgi-ip27 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
sgi-ip32 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sibyte MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sni Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
txx9 Merge branch 'mips-next-3.9' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next 2013-02-21 12:51:33 +01:00
vr41xx MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
wrppmc MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
Kbuild MIPS: Repair Kbuild make clean breakage. 2010-10-19 18:32:39 +01:00
Kbuild.platforms Merge branch 'mips-next-3.9' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next 2013-02-21 12:51:33 +01:00
Kconfig MIPS: Kconfig: remove "config MIPS_DISABLE_OBSOLETE_IDE" 2013-05-08 01:19:06 +02:00
Kconfig.debug Fix typo in various Kconfig file 2012-04-16 14:40:08 +02:00
Makefile MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00