linux_old1/arch/mips/cavium-octeon
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
..
executive Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-08-07 08:47:00 -07:00
.gitignore MIPS: Octeon: Add device tree source files. 2012-07-23 13:54:52 +01:00
Kconfig MIPS: OCTEON: Move CAVIUM_OCTEON_CVMSEG_SIZE to CPU_CAVIUM_OCTEON 2014-05-30 21:01:10 +02:00
Makefile Merge branch '3.10-fixes' into mips-for-linux-next 2013-07-12 18:11:43 +02:00
Platform MIPS: OCTEON: Rename Kconfig CAVIUM_OCTEON_REFERENCE_BOARD to CAVIUM_OCTEON_SOC 2013-06-10 18:01:25 +02:00
cpu.c MIPS: Octeon: Place cnmips_cu2_setup in __init memory. 2010-10-04 18:34:00 +01:00
csrc-octeon.c MIPS: Optimize current_cpu_type() for better code. 2013-09-17 18:50:53 +02:00
dma-octeon.c x86: Don't panic if can not alloc buffer for swiotlb 2013-01-29 19:36:53 -08:00
flash_setup.c mips/octeon: 16-Bit NOR flash was not being detected during boot 2012-11-09 11:37:16 +01:00
oct_ilm.c MIPS: Octeon: remove unnecessary null test before debugfs_remove_recursive 2014-08-02 00:06:47 +02:00
octeon-irq.c MIPS: Octeon: Add twsi interrupt initialization for OCTEON 3XXX, 5XXX, 63XX 2014-06-04 22:50:42 +02:00
octeon-memcpy.S MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
octeon-platform.c MIPS: OCTEON: Supply OCTEON+ USB nodes in internal device trees. 2014-01-23 13:02:35 +01:00
octeon_3xxx.dts MIPS: OCTEON: Supply OCTEON+ USB nodes in internal device trees. 2014-01-23 13:02:35 +01:00
octeon_68xx.dts MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
octeon_boot.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
setup.c MIPS: OCTEON: make get_system_type() thread-safe 2014-08-19 18:24:42 +02:00
smp.c MIPS: OCTEON: disable HOTPLUG_CPU if the bootloader version is incorrect 2014-08-02 00:06:42 +02:00