linux/arch
Aaro Koskinen 1040b2300e MIPS: OCTEON: make get_system_type() thread-safe
commit 608308682a upstream.

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>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-17 09:19:16 -07:00
..
alpha
arc ARC: Implement ptrace(PTRACE_GET_THREAD_AREA) 2014-07-28 08:06:04 -07:00
arm ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled 2014-09-05 16:34:17 -07:00
arm64 locking/mutex: Disable optimistic spinning on some architectures 2014-07-28 08:06:03 -07:00
avr32
blackfin
c6x Build fix for c6x 2014-03-07 09:52:46 -08:00
cris cris: convert ffs from an object-like macro to a function-like macro 2014-03-10 17:26:21 -07:00
frv
hexagon
ia64 hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
m32r
m68k m68k: Skip futex_atomic_cmpxchg_inatomic() test 2014-04-14 06:50:05 -07:00
metag parisc,metag: Do not hardcode maximum userspace stack size 2014-07-17 16:21:03 -07:00
microblaze
mips MIPS: OCTEON: make get_system_type() thread-safe 2014-09-17 09:19:16 -07:00
mn10300
openrisc
parisc parisc: Remove SA_RESTORER define 2014-07-31 12:52:56 -07:00
powerpc powerpc/thp: Use ACCESS_ONCE when loading pmdp 2014-09-17 09:19:11 -07:00
s390 s390/locking: Reenable optimistic spinning 2014-09-17 09:19:07 -07:00
score
sh hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
sparc arch/sparc/math-emu/math_32.c: drop stray break operator 2014-08-14 09:38:26 +08:00
tile hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
um
unicore32 arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error 2014-07-09 11:18:29 -07:00
x86 x86/xen: resume timer irqs early 2014-09-05 16:34:16 -07:00
xtensa xtensa: add fixup for double exception raised in window overflow 2014-08-07 14:52:39 -07:00
.gitignore
Kconfig