summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2020-09-25 22:42:30 +0200
committerVasily Gorbik <gor@linux.ibm.com>2020-09-30 12:09:54 +0200
commit86cde618e718d0d286a565bcabfce5bdfc304685 (patch)
tree11345ab483f0f917c5f653689e4dc5695235f86b
parent3731ac579519d6c24ad2c5ac91959586b1919b5c (diff)
downloadlinux-86cde618e718d0d286a565bcabfce5bdfc304685.tar.bz2
s390/startup: correct "dfltcc" option parsing
Currently if just "dfltcc" is passed as a kernel command line option "val" going to be NULL, this leads to reading at address 0 in strcmp(val, "off") Fix that by making sure "val" is not NULL. This does not affect option handling logic. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/boot/ipl_parm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index 92ebc4a58fe2..1add096e09a6 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -230,7 +230,7 @@ void parse_boot_command_line(void)
if (!strcmp(param, "vmalloc") && val)
vmalloc_size = round_up(memparse(val, NULL), PAGE_SIZE);
- if (!strcmp(param, "dfltcc")) {
+ if (!strcmp(param, "dfltcc") && val) {
if (!strcmp(val, "off"))
zlib_dfltcc_support = ZLIB_DFLTCC_DISABLED;
else if (!strcmp(val, "on"))