diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2024-07-11 16:41:45 +0200 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2024-08-20 13:06:24 +0900 |
commit | 455261dc71f1db53e458196bf6e00ff766b1b7b1 (patch) | |
tree | 11e075f34aefb218059bd68814f475e1279cb25d | |
parent | f5c3319f3b9df90f30a1e7cc41585462081cd8b6 (diff) | |
download | linux-rpi-455261dc71f1db53e458196bf6e00ff766b1b7b1.tar.gz linux-rpi-455261dc71f1db53e458196bf6e00ff766b1b7b1.tar.bz2 linux-rpi-455261dc71f1db53e458196bf6e00ff766b1b7b1.zip |
initramfs: break loop when decompression finishestizen_9.0_m2_releaseaccepted/tizen/unified/x/asan/20241013.235457accepted/tizen/unified/x/20240823.023205accepted/tizen/unified/toolchain/20241004.101221accepted/tizen/unified/dev/20240826.221248accepted/tizen/unified/20240822.181347accepted/tizen/9.0/unified/20241030.231225accepted/tizen_unified_x_asanaccepted/tizen_unified_toolchainaccepted/tizen_unified_devaccepted/tizen_9.0_unified
This fixes booting with initramfs (cpio.gz based) with additional garbage
added after the main initramfs image.
The below message is displayed during booting.
[ 0.546162] rootfs image is not initramfs (invalid magic at start of compressed archive); looks like an initrd
Change-Id: Iddf10f6696c7d15ec68d29bc69614523c9fd9b65
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
-rw-r--r-- | init/initramfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 8d0fd946cdd2..828f7f4db67c 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -520,6 +520,7 @@ static char * __init unpack_to_rootfs(char *buf, unsigned long len) &my_inptr, error); if (res) error("decompressor failed"); + break; } else if (compress_name) { if (!message) { snprintf(msg_buf, sizeof msg_buf, |