mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
x86/kaslr: Remove bogus warning and unnecessary goto
Drop the warning on seeing "--" in handle_mem_options(). This will trigger whenever one of the memory options is present in the command line together with "--", but there's no problem if that is the case. Replace goto with break. Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200727230801.3468620-3-nivedita@alum.mit.edu
This commit is contained in:
parent
709709ac64
commit
e2ee617316
@ -295,10 +295,8 @@ static void handle_mem_options(void)
|
||||
while (*args) {
|
||||
args = next_arg(args, ¶m, &val);
|
||||
/* Stop at -- */
|
||||
if (!val && strcmp(param, "--") == 0) {
|
||||
warn("Only '--' specified in cmdline");
|
||||
goto out;
|
||||
}
|
||||
if (!val && strcmp(param, "--") == 0)
|
||||
break;
|
||||
|
||||
if (!strcmp(param, "memmap")) {
|
||||
mem_avoid_memmap(PARSE_MEMMAP, val);
|
||||
@ -311,7 +309,7 @@ static void handle_mem_options(void)
|
||||
continue;
|
||||
mem_size = memparse(p, &p);
|
||||
if (mem_size == 0)
|
||||
goto out;
|
||||
break;
|
||||
|
||||
mem_limit = mem_size;
|
||||
} else if (!strcmp(param, "efi_fake_mem")) {
|
||||
@ -319,7 +317,6 @@ static void handle_mem_options(void)
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
free(tmp_cmdline);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user