We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd24bdb commit ddd5336Copy full SHA for ddd5336
init/main.c
@@ -633,11 +633,11 @@ static void __init setup_command_line(char *command_line)
633
ilen = strlen(extra_init_args) + 4; /* for " -- " */
634
}
635
636
- len = xlen + strlen(boot_command_line) + 1;
+ len = xlen + strlen(boot_command_line) + ilen + 1;
637
638
- saved_command_line = memblock_alloc(len + ilen, SMP_CACHE_BYTES);
+ saved_command_line = memblock_alloc(len, SMP_CACHE_BYTES);
639
if (!saved_command_line)
640
- panic("%s: Failed to allocate %zu bytes\n", __func__, len + ilen);
+ panic("%s: Failed to allocate %zu bytes\n", __func__, len);
641
642
len = xlen + strlen(command_line) + 1;
643
0 commit comments