[PATCH 1/3] init: bootconfig: Remove all bootconfig data when the init memory is removed

From: Masami Hiramatsu
Date: Thu Aug 26 2021 - 05:12:11 EST


Since the bootconfig is used only in the init functions,
it doesn't need to keep the data after boot. Free it when
the init memory is removed.

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
init/main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/init/main.c b/init/main.c
index 8d97aba78c3a..d9b0a99bb2dd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1493,6 +1493,7 @@ static int __ref kernel_init(void *unused)
kprobe_free_init_mem();
ftrace_free_init_mem();
kgdb_free_init_mem();
+ xbc_destroy_all();
free_initmem();
mark_readonly();