]> git.baikalelectronics.ru Git - kernel.git/commit
s390/sclp: avoid potential usage of uninitialized value
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 13 Apr 2018 16:22:14 +0000 (18:22 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Apr 2018 07:10:17 +0000 (09:10 +0200)
commitef16cc206ccfccc6bc014a6cc2af317379c90d99
tree20f0041374238b8f31e1a719930873a7c40112f7
parentfedbd783dfdfa040524ea8eb8a31cb2a775a133b
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: 238e3692e389 ("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>
drivers/s390/char/sclp_early_core.c