diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 41824e776b6ca7b0a0339bbbbd5e9f19ed9e4406..295be1d07b8275d197c25c94e5d8954b61e07402 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -782,7 +782,7 @@ void mark_rodata_ro(void) * The rodata section (but not the kernel text!) should also be * not-executable. */ - set_memory_nx(rodata_start, (end - start) >> PAGE_SHIFT); + set_memory_nx(rodata_start, (end - rodata_start) >> PAGE_SHIFT); rodata_test();