diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-11-30 12:00:28 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-02 15:31:08 +0100 |
commit | 9c0952344d732ec47d05653d471c720bce112fcd (patch) | |
tree | 6b4d83f745cf1eedc801531bdf728a626766cecb /arch/s390/include/asm/sclp.h | |
parent | 9e3ea19e35635ecd8373fc04f5dfb072be5f6d2c (diff) | |
download | op-kernel-dev-9c0952344d732ec47d05653d471c720bce112fcd.zip op-kernel-dev-9c0952344d732ec47d05653d471c720bce112fcd.tar.gz |
s390/smp,sclp: fix size of sclp_cpu_info structure
struct sclp_cpu_info contains entries only for 255 cpus, while the new
smp fallback sigp detection code will fill up to 256 entries.
Even though there is no machine available which has 256 cpus and where
in addition the fallback sigp cpu detection code will be used we better
fix this, to prevent out of bound accesses.
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/asm/sclp.h')
-rw-r--r-- | arch/s390/include/asm/sclp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index 30ef748..2f39095 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h @@ -8,6 +8,7 @@ #include <linux/types.h> #include <asm/chpid.h> +#include <asm/cpu.h> #define SCLP_CHP_INFO_MASK_SIZE 32 @@ -37,7 +38,7 @@ struct sclp_cpu_info { unsigned int standby; unsigned int combined; int has_cpu_type; - struct sclp_cpu_entry cpu[255]; + struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1]; }; int sclp_get_cpu_info(struct sclp_cpu_info *info); |