I hope that one can actually interchange the order of these calls a bit
so that they read

        mark_readonly();
        update_rai_access();
        free_initmem();

because there will be some metadata associated to each rai_* macro
invocation that might as well live in __initdata. But for now, we will
live with that wasted space.

Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
 init/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/init/main.c b/init/main.c
index a664246450d1..39709ca33316 100644
--- a/init/main.c
+++ b/init/main.c
@@ -92,6 +92,7 @@
 #include <linux/rodata_test.h>
 #include <linux/jump_label.h>
 #include <linux/mem_encrypt.h>
+#include <linux/rai.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -1066,6 +1067,7 @@ static int __ref kernel_init(void *unused)
        ftrace_free_init_mem();
        free_initmem();
        mark_readonly();
+       update_rai_access();
 
        /*
         * Kernel mappings are now finalized - update the userspace page-table
-- 
2.19.1.6.gbde171bbf5

Reply via email to