linux_dsm_epyc7002/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
cpu.c
csrc-octeon.c
dma-octeon.c
flash_setup.c
Kconfig MIPS: OCTEON: Move CAVIUM_OCTEON_CVMSEG_SIZE to CPU_CAVIUM_OCTEON 2014-05-30 21:01:10 +02:00
Makefile
oct_ilm.c MIPS: Octeon: remove unnecessary null test before debugfs_remove_recursive 2014-08-02 00:06:47 +02:00
octeon_3xxx.dts
octeon_68xx.dts
octeon_boot.h
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
octeon-platform.c
Platform
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