mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
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>
This commit is contained in:
parent
3731ac5795
commit
86cde618e7
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user