VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Masami Hiramatsu <mhiramat@kernel.org> 2020-11-20 11:29:04 +0900 committer: Steven Rostedt (VMware) <rostedt@goodmis.org> 2020-11-30 23:22:11 -0500 commit: 24aed09451270b6a2a78adf8a34918d12ffb7dcf parent: 68e10d5ff512b503dcba1246ad5620f32035e135
Commit Summary:
bootconfig: Load size and checksum in the footer as le32
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index 20baced721ad..32b2a8affafd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -288,8 +288,8 @@ static void * __init get_boot_config_from_initrd(u32 *_size, u32 *_csum)
 
 found:
 	hdr = (u32 *)(data - 8);
-	size = hdr[0];
-	csum = hdr[1];
+	size = le32_to_cpu(hdr[0]);
+	csum = le32_to_cpu(hdr[1]);
 
 	data = ((void *)hdr) - size;
 	if ((unsigned long)data < initrd_start) {