]> asedeno.scripts.mit.edu Git - linux.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)
committerHelge Deller <deller@gmx.de>
Fri, 3 May 2019 21:47:40 +0000 (23:47 +0200)
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+
arch/parisc/mm/init.c

index 513f747b0d9da4e484dcc6b4029b46ec8047947d..3b0f9eab7f2cdcf0259ec6b4def076fea0b87565 100644 (file)
@@ -478,7 +478,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,