aboutsummaryrefslogtreecommitdiffstats
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorAaro Koskinen <[email protected]>2014-07-22 11:51:08 +0000
committerRalf Baechle <[email protected]>2014-08-19 16:24:42 +0000
commit608308682addfdc7b8e2aee88f0e028331d88e4d (patch)
treedbf68401067b7d6582d55705afb23ab374c57329 /lib/assoc_array.c
parentMIPS: CPS: Initialize EVA before bringing up VPEs from secondary cores (diff)
downloadkernel-608308682addfdc7b8e2aee88f0e028331d88e4d.tar.gz
kernel-608308682addfdc7b8e2aee88f0e028331d88e4d.zip
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 <[email protected]> Cc: [email protected] Reviewed-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7437/ Signed-off-by: James Hogan <[email protected]>
Diffstat (limited to 'lib/assoc_array.c')
0 files changed, 0 insertions, 0 deletions