Commit 5ac8e698 authored by Helge Deller's avatar Helge Deller Committed by Greg Kroah-Hartman

parisc: Allow live-patching of __meminit functions

commit d19a1290 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: default avatarHelge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org>	# 4.20+
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7049b323
...@@ -495,7 +495,7 @@ static void __init map_pages(unsigned long start_vaddr, ...@@ -495,7 +495,7 @@ static void __init map_pages(unsigned long start_vaddr,
void __init set_kernel_text_rw(int enable_read_write) 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; unsigned long end = (unsigned long) &data_start;
map_pages(start, __pa(start), end-start, map_pages(start, __pa(start), end-start,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment