mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
init/main.c: return 1 from handled __setup() functions
[ Upstream commit f9a40b0890658330c83c95511f9d6b396610defc ] initcall_blacklist() should return 1 to indicate that it handled its cmdline arguments. set_debug_rodata() should return 1 to indicate that it handled its cmdline arguments. Print a warning if the option string is invalid. This prevents these strings from being added to the 'init' program's environment as they are not init arguments/parameters. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
b4be80aa4b
commit
a95bbfea8f
1 changed files with 4 additions and 2 deletions
|
|
@ -831,7 +831,7 @@ static int __init initcall_blacklist(char *str)
|
|||
}
|
||||
} while (str_entry);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static bool __init_or_module initcall_blacklisted(initcall_t fn)
|
||||
|
|
@ -1072,7 +1072,9 @@ static noinline void __init kernel_init_freeable(void);
|
|||
bool rodata_enabled __ro_after_init = true;
|
||||
static int __init set_debug_rodata(char *str)
|
||||
{
|
||||
return strtobool(str, &rodata_enabled);
|
||||
if (strtobool(str, &rodata_enabled))
|
||||
pr_warn("Invalid option string for rodata: '%s'\n", str);
|
||||
return 1;
|
||||
}
|
||||
__setup("rodata=", set_debug_rodata);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue