diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-04-19 19:52:09 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-04-19 19:52:09 +0300 |
commit | 9c6e84e4baf01a33a72cdfd1256d0f281c0ea812 (patch) | |
tree | c5c2ec8c3bc2822b86eeba29f57ebf313c916e09 /include/linux | |
parent | dbe0a7be283829566c966642c739e820e0be1081 (diff) | |
parent | 298b871cd55a607037ac8af0011b9fdeb54c1e65 (diff) | |
download | linux-9c6e84e4baf01a33a72cdfd1256d0f281c0ea812.tar.xz |
Merge tag 'bootconfig-fixes-v6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig fixes from Masami Hiramatsu:
- Fix potential static_command_line buffer overrun.
Currently we allocate the memory for static_command_line based on
"boot_command_line", but it will copy "command_line" into it. So we
use the length of "command_line" instead of "boot_command_line" (as
we previously did)
- Use memblock_free_late() in xbc_exit() instead of memblock_free()
after the buddy system is initialized
- Fix a kerneldoc warning
* tag 'bootconfig-fixes-v6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
bootconfig: Fix the kerneldoc of _xbc_exit()
bootconfig: use memblock_free_late to free xbc memory to buddy
init/main.c: Fix potential static_command_line memory overflow
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bootconfig.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h index e5ee2c694401..3f4b4ac527ca 100644 --- a/include/linux/bootconfig.h +++ b/include/linux/bootconfig.h @@ -288,7 +288,12 @@ int __init xbc_init(const char *buf, size_t size, const char **emsg, int *epos); int __init xbc_get_info(int *node_size, size_t *data_size); /* XBC cleanup data structures */ -void __init xbc_exit(void); +void __init _xbc_exit(bool early); + +static inline void xbc_exit(void) +{ + _xbc_exit(false); +} /* XBC embedded bootconfig data in kernel */ #ifdef CONFIG_BOOT_CONFIG_EMBED |