aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-04-13 18:22:14 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-04-16 09:10:17 +0200
commitdccccd332d028f57358a8b64ca88e691fc8be5b7 (patch)
tree20f0041374238b8f31e1a719930873a7c40112f7 /drivers/s390
parentLinux 4.17-rc1 (diff)
downloadlinux-dev-dccccd332d028f57358a8b64ca88e691fc8be5b7.tar.xz
linux-dev-dccccd332d028f57358a8b64ca88e691fc8be5b7.zip
s390/sclp: avoid potential usage of uninitialized value
sclp_early_printk could be used before .bss section is zeroed (i.e. from als.c during the decompressor phase), therefore values used by sclp_early_printk should be located in the .data section. Another reason for that is to avoid potential initrd corruption, if some code in future would use sclp_early_printk before initrd is moved from possibly overlapping with .bss section region to a safe location. Fixes: 0b0d1173d8ae ("s390/sclp: 32 bit event mask compatibility mode") Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/sclp_early_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_early_core.c b/drivers/s390/char/sclp_early_core.c
index 5f8d9ea69ebd..eceba3858cef 100644
--- a/drivers/s390/char/sclp_early_core.c
+++ b/drivers/s390/char/sclp_early_core.c
@@ -18,7 +18,7 @@ int sclp_init_state __section(.data) = sclp_init_state_uninitialized;
* Used to keep track of the size of the event masks. Qemu until version 2.11
* only supports 4 and needs a workaround.
*/
-bool sclp_mask_compat_mode;
+bool sclp_mask_compat_mode __section(.data);
void sclp_early_wait_irq(void)
{