diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2020-09-25 23:42:30 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-09-30 13:09:54 +0300 |
commit | 86cde618e718d0d286a565bcabfce5bdfc304685 (patch) | |
tree | 11345ab483f0f917c5f653689e4dc5695235f86b /arch/s390/boot/ipl_parm.c | |
parent | 3731ac579519d6c24ad2c5ac91959586b1919b5c (diff) | |
download | linux-86cde618e718d0d286a565bcabfce5bdfc304685.tar.xz |
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>
Diffstat (limited to 'arch/s390/boot/ipl_parm.c')
-rw-r--r-- | arch/s390/boot/ipl_parm.c | 2 |
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")) |