mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] bootconfig: Fixes for v7.4-rc1
@ 2026-11-01  0:00 Masami Hiramatsu (Google)
  2026-11-01 17:58 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-11-01  0:00 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Avi Weiss, Steven Rostedt, Masami Hiramatsu, linux-kernel

Linus,

Bootconfig fixes for v7.4-rc1:

- init/bootconfig: Pass init arguments in documented order
  Parse extra_init_args before command-line init arguments in
  start_kernel(). This ensures command-line options take precedence over
  bootconfig, matching the documented order and saved command line.


Please pull the latest bootconfig-fixes-v7.4-rc1 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
bootconfig-fixes-v7.4-rc1

Tag SHA1: 3f9fe3c18f3bbbbf8b7ef9111d133051f9d7d890
Head SHA1: 278b2abf660a3e0991eb9f16f11bd9e9514a286d


Avi Weiss (1):
      init/bootconfig: pass init arguments in documented order

----
 init/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---------------------------
commit 278b2abf660a3e0991eb9f16f11bd9e9514a286d
Author: Avi Weiss <thnkslprpt@gmail.com>
Date:   Tue Oct 27 09:37:20 2026 +0200

    init/bootconfig: pass init arguments in documented order
    
    start_kernel() appends command-line init arguments before
    bootconfig init arguments, while setup_command_line()
    places them in the opposite order. As a result, the
    arguments passed to init do not match the saved command
    line, reversing the intended precedence of options.
    
    Parse extra_init_args before after_dashes so command-line
    init arguments are passed last.
    
    Link: https://lore.kernel.org/all/20261027073719.4010659-2-thnkslprpt@gmail.com/
    
    Fixes: b66fbbe8d482 ("init/bootconfig: Reorder init parameter from bootconfig and cmdline")
    Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

diff --git a/init/main.c b/init/main.c
index 31f2bf54976a..4efcb9956c39 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1028,12 +1028,12 @@ void start_kernel(void)
 				  __stop___param - __start___param,
 				  -1, -1, NULL, &unknown_bootoption);
 	print_unknown_bootoptions();
-	if (!IS_ERR_OR_NULL(after_dashes))
-		parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
-			   NULL, set_init_arg);
 	if (extra_init_args)
 		parse_args("Setting extra init args", extra_init_args,
 			   NULL, 0, -1, -1, NULL, set_init_arg);
+	if (!IS_ERR_OR_NULL(after_dashes))
+		parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
+			   NULL, set_init_arg);
 
 	/* Architectural and non-timekeeping rng init, before allocator init */
 	random_init_early(command_line);

-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-01 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-01  0:00 [GIT PULL] bootconfig: Fixes for v7.4-rc1 Masami Hiramatsu (Google)
2026-11-01 17:58 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®