diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-09-04 14:26:03 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 15:45:08 +0200 |
commit | fade4dc49101e3b68fb375fd2b00d0ef1f31a36f (patch) | |
tree | 302bd25e0575ce0b0ad33e34378577ad506bb786 /arch/s390/include | |
parent | 34cda99260247873df53ae00885fb0f426b149a5 (diff) | |
download | op-kernel-dev-fade4dc49101e3b68fb375fd2b00d0ef1f31a36f.zip op-kernel-dev-fade4dc49101e3b68fb375fd2b00d0ef1f31a36f.tar.gz |
s390/sysinfo,topology: fix cpu topology maximum nesting detection
The maximum nesting of the cpu topology is evaluated when /proc/sysinfo
is the first time read. This happens without a lock and a concurrent
reader on a different cpu can see and use an invalid intermediate value.
Besides the fact that this race is quite unlikely the worst thing that
could happen is that /proc/sysinfo would contain bogus information about
the machine's cpu topology.
Nevertheless this should be fixed. So move the detection code to the
early machine detection code and since now the value is early available
use it in the topology code as well.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/sysinfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h index 12e5256..04e6e977 100644 --- a/arch/s390/include/asm/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h @@ -118,6 +118,8 @@ struct sysinfo_3_2_2 { char reserved_544[3552]; }; +extern int topology_max_mnest; + #define TOPOLOGY_CPU_BITS 64 #define TOPOLOGY_NR_MAG 6 |