]> err.no Git - linux-2.6/blobdiff - arch/x86_64/mm/init.c
Do not replace whole memcpy in apply alternatives
[linux-2.6] / arch / x86_64 / mm / init.c
index 38f5d63680060769a58b7ac607f9085b6acf19d3..458893b376f811fe1e3b0b9f87444a68aeae53c6 100644 (file)
@@ -600,6 +600,16 @@ void mark_rodata_ro(void)
 {
        unsigned long start = (unsigned long)_stext, end;
 
+#ifdef CONFIG_HOTPLUG_CPU
+       /* It must still be possible to apply SMP alternatives. */
+       if (num_possible_cpus() > 1)
+               start = (unsigned long)_etext;
+#endif
+
+#ifdef CONFIG_KPROBES
+       start = (unsigned long)__start_rodata;
+#endif
+       
        end = (unsigned long)__end_rodata;
        start = (start + PAGE_SIZE - 1) & PAGE_MASK;
        end &= PAGE_MASK;