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

From
Masami Hiramatsu <mhiramat@kernel.org>
Date
2021-08-26 14:27:55
Reply to
Masami Hiramatsu, 2021-08-26
On Thu, 26 Aug 2021 18:12:07 +0900
Masami Hiramatsu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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@kernel.org>
---
 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();
Oops, xbc_destroy_all() is not defined if CONFIG_BOOT_CONFIG=n.
Let me fix that.

Thanks,
 	free_initmem();
 	mark_readonly();
 

-- 
Masami Hiramatsu [off-list ref]
Thread (7 messages) 7 messages, 2 authors, last reply 2021-08-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help