WSL2-Linux-Kernel/arch/mips
Aaro Koskinen 608308682a MIPS: OCTEON: make get_system_type() thread-safe
get_system_type() is not thread-safe on OCTEON. It uses static data,
also more dangerous issue is that it's calling cvmx_fuse_read_byte()
every time without any synchronization. Currently it's possible to get
processes stuck looping forever in kernel simply by launching multiple
readers of /proc/cpuinfo:

	(while true; do cat /proc/cpuinfo > /dev/null; done) &
	(while true; do cat /proc/cpuinfo > /dev/null; done) &
	...

Fix by initializing the system type string only once during the early
boot.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: stable@vger.kernel.org
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: http://patchwork.linux-mips.org/patch/7437/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
2014-08-19 18:24:42 +02:00
..
alchemy MIPS: Alchemy: Fix db1200 PSC clock enablement 2014-08-19 13:30:47 +02:00
ar7
ath79
bcm47xx MIPS: BCM47XX: Fix reboot problem on BCM4705/BCM4785 2014-08-19 13:30:47 +02:00
bcm63xx
boot
cavium-octeon MIPS: OCTEON: make get_system_type() thread-safe 2014-08-19 18:24:42 +02:00
cobalt
configs Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-08-07 08:47:00 -07:00
dec
emma
fw
include MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init' 2014-08-19 18:24:41 +02:00
jazz
jz4740 This is the bulk of GPIO changes for the v3.17 development 2014-08-08 18:00:35 -07:00
kernel MIPS: CPS: Initialize EVA before bringing up VPEs from secondary cores 2014-08-19 18:24:41 +02:00
kvm
lantiq
lasat
lib
loongson MIPS: Loongson: Fix COP2 usage for preemptible kernel 2014-08-19 18:04:24 +02:00
loongson1
math-emu
mm MIPS: Remove race window in page fault handling 2014-08-19 13:31:09 +02:00
mti-malta MIPS: Malta: Improve system memory detection for '{e, }memsize' >= 2G 2014-08-19 13:30:47 +02:00
mti-sead3
net
netlogic
oprofile
paravirt
pci
pmcs-msp71xx MIPS: MSP71xx: remove unused plat_irq_dispatch() argument 2014-08-19 13:30:45 +02:00
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni
txx9
vr41xx
Kbuild
Kbuild.platforms
Kconfig kexec: load and relocate purgatory at kernel load time 2014-08-08 15:57:32 -07:00
Kconfig.debug
Makefile