diff --git a/init/main.c b/init/main.c index cfaf5a563b6e9a..69ab36593a8e8e 100644 --- a/init/main.c +++ b/init/main.c @@ -1477,7 +1477,9 @@ static void mark_readonly(void) * insecure pages which are W+X. */ rcu_barrier(); + get_online_mems(); mark_rodata_ro(); + put_online_mems(); rodata_test(); } else pr_info("Kernel memory protection disabled.\n");