Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

init/main.c: check if rdinit was explicitly set before printing warning

The rdinit parameter is set by default, and attempted during boot even if
not specified in the command line. Only print the warning about rdinit
being inaccessible if the rdinit value was found in command line; it's
just noise otherwise.

[akpm@linux-foundation.org: move ramdisk_execute_command_set into __initdata]
Link: https://lkml.kernel.org/r/20260111125635.53682-1-lillian@star-ark.net
Signed-off-by: Lillian Berry <lillian@star-ark.net>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Francesco Valla <francesco@valla.it>
Cc: Guo Weikang <guoweikang.kernel@gmail.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Huan Yang <link@vivo.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lillian Berry and committed by
Andrew Morton
a906f3ae 4cc67b04

+5 -2
+5 -2
init/main.c
··· 162 162 163 163 static char *execute_command; 164 164 static char *ramdisk_execute_command = "/init"; 165 + static bool __initdata ramdisk_execute_command_set; 165 166 166 167 /* 167 168 * Used to generate warnings if static_key manipulation functions are used ··· 624 623 unsigned int i; 625 624 626 625 ramdisk_execute_command = str; 626 + ramdisk_execute_command_set = true; 627 627 /* See "auto" comment in init_setup */ 628 628 for (i = 1; i < MAX_INIT_ARGS; i++) 629 629 argv_init[i] = NULL; ··· 1701 1699 int ramdisk_command_access; 1702 1700 ramdisk_command_access = init_eaccess(ramdisk_execute_command); 1703 1701 if (ramdisk_command_access != 0) { 1704 - pr_warn("check access for rdinit=%s failed: %i, ignoring\n", 1705 - ramdisk_execute_command, ramdisk_command_access); 1702 + if (ramdisk_execute_command_set) 1703 + pr_warn("check access for rdinit=%s failed: %i, ignoring\n", 1704 + ramdisk_execute_command, ramdisk_command_access); 1706 1705 ramdisk_execute_command = NULL; 1707 1706 prepare_namespace(); 1708 1707 }