mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
s390/startup: correct command line options parsing
Check val is not NULL before accessing it. This might happen if corresponding kernel command line options are used without specifying values. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
a45425d8a5
commit
227f52a43a
1 changed files with 3 additions and 3 deletions
|
@ -223,12 +223,12 @@ void parse_boot_command_line(void)
|
|||
while (*args) {
|
||||
args = next_arg(args, ¶m, &val);
|
||||
|
||||
if (!strcmp(param, "mem")) {
|
||||
if (!strcmp(param, "mem") && val) {
|
||||
memory_end = round_down(memparse(val, NULL), PAGE_SIZE);
|
||||
memory_end_set = 1;
|
||||
}
|
||||
|
||||
if (!strcmp(param, "vmalloc"))
|
||||
if (!strcmp(param, "vmalloc") && val)
|
||||
vmalloc_size = round_up(memparse(val, NULL), PAGE_SIZE);
|
||||
|
||||
if (!strcmp(param, "noexec")) {
|
||||
|
@ -237,7 +237,7 @@ void parse_boot_command_line(void)
|
|||
noexec_disabled = 1;
|
||||
}
|
||||
|
||||
if (!strcmp(param, "facilities"))
|
||||
if (!strcmp(param, "facilities") && val)
|
||||
modify_fac_list(val);
|
||||
|
||||
if (!strcmp(param, "nokaslr"))
|
||||
|
|
Loading…
Add table
Reference in a new issue