The patch titled Subject: init/main.c: return 1 from handled __setup() functions has been added to the -mm tree. Its filename is init-mainc-return-1-from-handled-__setup-functions.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/init-mainc-return-1-from-handled-__setup-functions.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/init-mainc-return-1-from-handled-__setup-functions.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Subject: init/main.c: return 1 from handled __setup() functions 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/20220221050901.23985-1-rdunlap@xxxxxxxxxxxxx Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Reported-by: Igor Zhbanov <i.zhbanov@xxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- init/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/init/main.c~init-mainc-return-1-from-handled-__setup-functions +++ a/init/main.c @@ -1190,7 +1190,7 @@ static int __init initcall_blacklist(cha } } while (str_entry); - return 0; + return 1; } static bool __init_or_module initcall_blacklisted(initcall_t fn) @@ -1448,7 +1448,9 @@ static noinline void __init kernel_init_ 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 _ Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxxx are mm-memcontrol-return-1-from-cgroupmemory-__setup-handler.patch mm-mmap-return-1-from-stack_guard_gap-__setup-handler.patch inith-improve-__setup-and-early_param-documentation.patch init-mainc-return-1-from-handled-__setup-functions.patch docs-sysctl-kernel-add-missing-bit-to-panic_print-fix.patch