Skip to content

Commit

Permalink
kernel/extable: fix address-checks for core_kernel and init areas
Browse files Browse the repository at this point in the history
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: Helge Deller <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hdeller authored and torvalds committed Nov 28, 2013
1 parent e7c0d3d commit 5ecbe3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ 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;
}

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 &&
Expand Down

0 comments on commit 5ecbe3c

Please sign in to comment.