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: add warning when file specified in rdinit is inaccessible

Avoid silently ignoring the initramfs when the file specified in rdinit is
not usable. This prints an error that clearly explains the issue (file
was not found, vs initramfs was not found).

Link: https://lkml.kernel.org/r/20250707091411.1412681-1-lillian@star-ark.net
Signed-off-by: Lillian Berry <lillian@star-ark.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lillian Berry and committed by
Andrew Morton
98aa4d5d 4efec6c0

+5 -1
+5 -1
init/main.c
··· 1592 1592 * check if there is an early userspace init. If yes, let it do all 1593 1593 * the work 1594 1594 */ 1595 - if (init_eaccess(ramdisk_execute_command) != 0) { 1595 + int ramdisk_command_access; 1596 + ramdisk_command_access = init_eaccess(ramdisk_execute_command); 1597 + if (ramdisk_command_access != 0) { 1598 + pr_warn("check access for rdinit=%s failed: %i, ignoring\n", 1599 + ramdisk_execute_command, ramdisk_command_access); 1596 1600 ramdisk_execute_command = NULL; 1597 1601 prepare_namespace(); 1598 1602 }