]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
parisc: Allow live-patching of __meminit functions
authorHelge Deller <deller@gmx.de>
Wed, 1 May 2019 12:59:58 +0000 (14:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:21:59 +0000 (18:21 +0200)
commit d19a12906e5e558c0f6b6cfece7b7caf1012ef95 upstream.

When making the text sections writeable with set_kernel_text_rw(1),
include all text sections including those in the __init section.
Otherwise functions marked with __meminit will stay read-only.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # 4.20+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/mm/init.c

index 059187a3ded7402038f24adfda1f30ed1230c3a0..3d1305aa64b6e8c6b9601af8d6b42a7fde661966 100644 (file)
@@ -512,7 +512,7 @@ static void __init map_pages(unsigned long start_vaddr,
 
 void __init set_kernel_text_rw(int enable_read_write)
 {
-       unsigned long start = (unsigned long) _text;
+       unsigned long start = (unsigned long) __init_begin;
        unsigned long end   = (unsigned long) &data_start;
 
        map_pages(start, __pa(start), end-start,