Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ecbe3c3 authored by Helge Deller's avatar Helge Deller Committed by Linus Torvalds
Browse files

kernel/extable: fix address-checks for core_kernel and init areas



The init_kernel_text() and core_kernel_text() functions should not
include the labels _einittext and _etext when checking if an address is
inside the .text or .init sections.

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e7c0d3da
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr)
static inline int init_kernel_text(unsigned long addr)
{
	if (addr >= (unsigned long)_sinittext &&
	    addr <= (unsigned long)_einittext)
	    addr < (unsigned long)_einittext)
		return 1;
	return 0;
}
@@ -69,7 +69,7 @@ static inline int init_kernel_text(unsigned long addr)
int core_kernel_text(unsigned long addr)
{
	if (addr >= (unsigned long)_stext &&
	    addr <= (unsigned long)_etext)
	    addr < (unsigned long)_etext)
		return 1;

	if (system_state == SYSTEM_BOOTING &&