Regression with *bootconfig: Fix to remove bootconfig data from initrd while boot*
Dear Masami,
Commit de462e5f10 (bootconfig: Fix to remove bootconfig data from initrd while boot) causes a cosmetic regression on my x86 system with Debian Sid/unstable.
Despite having no bootconfig parameter on the Linux CLI, the warning below is shown.
'bootconfig' found on command line, but no bootconfig found
Reverting the commit fixes it.
Kind regards,
Paul
Quoted 7 lines · On Sun, 10 May 2020 19:16:47 +0200 Paul Menzel <[email protected]> wrote:
Dear Masami,
Commit
de462e5f10(bootconfig: Fix to remove bootconfig data from initrd while boot) causes a cosmetic regression on my x86 system with Debian Sid/unstable.
Quoted 6 lines
Despite having no
bootconfigparameter on the Linux CLI, the warning below is shown.'bootconfig' found on command line, but no bootconfig found
Reverting the commit fixes it.
Oops, sorry about that.
I'll fix it soon.
Thanks!
Signature · 1 line
Masami Hiramatsu <[email protected]>
PATCH 1/1 bootconfig: Fix to prevent warning message if no bootconfig option
Commit de462e5f1071 ("bootconfig: Fix to remove bootconfig data from initrd while boot") causes a cosmetic regression on dmesg, which warns "no bootconfig data" message without bootconfig cmdline option.
Fix setup_boot_config() by moving no bootconfig check after commandline option check.
--- init/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
init/main.c +6 -4
@@ -400,9 +400,8 @@ static void __init setup_boot_config(const char *cmdline)char *data, *copy;int ret; +/* Cut out the bootconfig data even if we have no bootconfig option */ data =get_boot_config_from_initrd (&size, &csum); -if (!data) - goto not_found;strlcpy (tmp_cmdline, boot_command_line,COMMAND_LINE_SIZE ); parse_args("bootconfig", tmp_cmdline, NULL, 0, 0, 0, NULL,
@@ -411,6 +410,11 @@ static void __init setup_boot_config(const char *cmdline)if (!bootconfig_found)return ; +if (!data) { +pr_err ("'bootconfig' found on command line, but no bootconfig found\n" ); +return ; + } +if (size >=XBC_DATA_MAX ) {pr_err ("bootconfig size %d greater than max size %d\n" , size,XBC_DATA_MAX );
@@ -446,8 +450,6 @@ static void __init setup_boot_config(const char *cmdline) extra_init_args = xbc_make_cmdline("init"); }return ; -not_found: -pr_err ("'bootconfig' found on command line, but no bootconfig found\n" ); }#else